October 2009
18 posts
Oct 1st
1 note
September 2009
15 posts
1 tag
Sep 30th
Sep 30th
1 tag
“Some of us have started to use a rule of thumb of “no chains in controllers”....”
– DO THIS. Dan Croak in testing named scopes
Sep 30th
1 tag
Sep 29th
1 note
1 tag
Learning Advanced Javascript →
Runnable slides by John Resig via Trivium
Sep 29th
1 note
Sep 25th
874 notes
2 tags
Maintain Order of SELECT with IN
So you know that ActiveRecord::Base#find can take an array of ids, right? User.find(1,2,3) #=> [#<User …>, #<User …>, #<User …>] Take a look at this though: User.find(2,1,3).map(&:id) #=> [1,2,3] I’ll bet you didn’t expect that. Okay, maybe you did. But I didn’t expect it. The above query gets transformed into this SQL: SELECT * FROM users...
Sep 24th
1 note
Sep 24th
2 tags
Sep 23rd
2 tags
Sep 22nd
Opacity returns to IE8 →
Yesterday, Microsoft released a post on the IEBlog that had both good and bad news. The good news was that opacity was back. The bad news was that setting opacity in such a way that IE8 would process it as IE8 is now more complicated than ever. Here’s the result: -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:...
Sep 22nd
9 notes
3 tags
Sep 22nd
Sep 17th
Sep 1st
15 notes