On 16 Jul 2009, at 12:26, Thriving K. wrote:
> named_scope :unarchive, lambda { |project_identifier|
> { :conditions => {:project_id => project_identifier,:archive =>
> false},
> order => :name}
> }
>
> Here is the code
>
> within condition i want to make something like :id=>"IN (3,4,5)" but i
> don't know how to write it in rails , i don't know what to search in
> google :(
just use:
:conditions => {:id => [1,2,4]}
Works perfectly.
Best regards
Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---