Alternative to merge_conditions in Rails 3

137 views
Skip to first unread message

james

unread,
Aug 28, 2010, 11:37:36 AM8/28/10
to Ruby on Rails: Talk
merge_conditions seems to be gone from rails 3. Is there something in
Rails 3 or Arel that would allow me to achieve the same thing, which
is to merge various types of conditions (array, hash, etc)? I haven't
spent much time with Arel, so I may be missing something obvious.

Thanks

Milan Iliev

unread,
Oct 11, 2010, 1:56:38 PM10/11/10
to Ruby on Rails: Talk
I've had luck with doing this:

Post.where(:comments => {author_id => 1}).where(:title => 'How to
specify nested conditions')

This seems to replace the need for merge_conditions.
Reply all
Reply to author
Forward
0 new messages