Quantcast
Channel: Tom’s Thoughts
Viewing all articles
Browse latest Browse all 22

Rails Warning Fail

$
0
0

Recent versions of rails 3 have started spitting out a new deprecation warning:

String-based interpolation of association conditions is deprecated. Please use a proc instead. So, for example, has_many :older_friends, :conditions => ‘age

#{age}’ should be changed to has_many :older_friends, :conditions => proc { “age > #{age}” }.

Now call me confused if you like, but isn’t the suggested replacement still doing just as much string interpolation as the original?


Viewing all articles
Browse latest Browse all 22

Trending Articles