On Jun 18, 2012, at 2:45 PM, cyber c. wrote:
> Hi,
>
> I see that
> Person.find(:all) and Person.find(:all, :params => {id => '2'}) returns
> all records irrespective of conditions. Is activeresource broken?
> PS: Im using rails 3.2.4
----
do you actually have a column in the db named 'params' ? That would seem to be
wrong so I'm gathering that what you are actually wanting is...
Person.find(:all, {:id => '2'}) # but coming from older versions of rails, I
don't feel all that comfortable with the syntax of that and would tend to do
Person.find(:all, :conditions => ["id = ?", '2'])
Craig
--
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.