Bundle install in parallel

Posted Over 10 years ago by Tadej.
github.com

Gave a shot to the new Bundler 1.4.0RC1 during the weekend and found out it now supports gem installation...

jQuery ajax success/done will not run callbacks if request is json but the response is empty (typical 200)

Posted Almost 11 years ago.

var onDone = function() {...

var onFail = function() {...

var params = {...

var url = ... $.ajax({ type: 'put', url: url, contentType: 'application/json; charset...

If you GROUP BY, make sure you ORDER BY NULL

Posted About 11 years ago by Marcus Mitchell.

TL;DR: If using :group => :some_field you might want to :order => 'NULL'. According to the man By default, MySQL...

DateTimes are Dates, beware

Posted About 11 years ago by dncrht.

datetime = DateTime.now date = datetime.to_date #or Date.today will assert: datetime.is_a? Date == true datetime.is_a? DateTime == true datetime.instance_of...

When you set date attributes, you should not pass times

Posted About 11 years ago by Arne Hartherz.

As you know, time zones make stuff a bit more difficult but are necessary. A time-zoned record is converted...

Profiling Ruby with ruby-prof

Posted Over 11 years ago by Nasir Jamal.

require 'ruby-prof' # you don't need this if you have ruby-prof in your Gemfile You can set one...

Database: Scopes, migrations, and indices

Posted Over 11 years ago by Julien Letessier.

Wether you modify an existing named scope or add a new one, or when you write a new query, make...

Writing raw SQL queries

Posted Over 11 years ago by Julien Letessier.

If you really, really have a good reason to write raw SQL (generally a bad practice), make sure you use...

ActiveRecord::NamedScopes (2.3.x) obtaining the SQL conditions

Posted Almost 12 years ago.

It's a good pratice to chain several named scopes like: Property.listable.for_2_or_more_guests.best_10_properties Now, to make the lesson more...