Interesting Things
- require ‘performance_patch’: Ruby 1.9′s require is much slower than Ruby 1.8′s. There’s a fix targeted for Ruby 1.9.3.
- jQuery.fx.off: A few weeks ago, someone wondered how to test jQuery dialog, since it uses animations which make dismissing it asynchronous and hard to test. The answer: set
jQuery.fx.off == true. jQuery will then skip animations and skip properties synchronously to their final states. - Reset Content vs jQuery: When a jQuery AJAX call receives a 205 Reset Content response, it doesn’t call your success callback.
- Rails doesn’t like join tables with attributes: When you use a join table and
has_and_belongs_to_many, the join can’t hold any extra information, just the presence of an association between two records. If you need to store metadata about that association, use a join model withhas_many through:instead. If you even have extra columns on a join table, Rails will now give you a deprecation warning. - Creating a
has_one: IfPersonhas_one :account, you canperson.build_accountto build a newAccountfor it, orperson.create_accountto build and save it. Likewise, ifAccountbelongs_to :person, you canaccount.build_personoraccount.create_person.
Stretch
Austin’s routine this morning gave all our thighs and calves a good stretch. And our jeans.