Josh Susser
reader · Not a member
Josh Susser's latest activity
Saturday, March 06 2010
-
Josh Susser created the ticket at 11:43 PMNot sure if this is considered a bug, but the behavior is surprising enough that I think it's worth changing. When using timestamped migration version numbers, ...
Friday, December 11 2009
Monday, November 30 2009
Saturday, August 08 2009
-
Josh Susser commented at 7:27 PMI think post.comments.any? is a more consistent API. IMO it's better to keep the number of generated methods on the base class to a minimum, and layer this kind...
Wednesday, May 06 2009
-
Josh Susser commented at 5:42 PMI put together a monkey patch to workaround the issue until it's fixed.
Tuesday, March 03 2009
-
- Tag changed from activerecord, has_many_through to activerecord, has_many_through, patch
While it's possible to create sets of conditions where this will work, you can also easily create ones where they don't. Just try an inequality test and you'll ...
Thursday, January 29 2009
-
Josh Susser commented at 7:40 AMI was going to suggest the block as an option. It's easy to do:
def or_if_blank(other=nil) self.blank? ? (other || yield) : self end
Then you can call it with e...
Saturday, January 17 2009
-
Josh Susser commented at 2:57 AMI mainly copied the rdoc from the old implementation but oh well. Fixed it up. Don't know enough about rdoc to fool it, so I added a doc-only method def that ge...
-
Josh Susser created the ticket at 1:32 AMI'm not a fan of Object#try, but if it's going to be in the code base, the implementation should at least be optimal. This patch collapses two method calls and ...
Friday, January 02 2009
-
Josh Susser created the ticket at 5:41 AMThis is a tiny patch to improve the readability and performance of #validates_associated in ActiveRecord. The obscure use of #inject is replaces by #collect and...