ok, starting to get a tad frustrated. rails ActiveRecord::Base docs…
…show the basic use of the find method to be as so:
Person.find(1) # returns the object for ID = 1
…but when i do the exact same method call in my code, i get this
error…
ArgumentError (wrong number of arguments (2 for 1))
this only started after i upgraded to 1.1.6.
what gives? any help appreciated, this basic method failing is doing a
great job of holding me up
thanks in advance.
post some more of your log so we can see where it’s failing exactly.
also, are you using any plugins that modify/extend ActiveRecord?
ed
On Mon, 2006-10-30 at 08:42 -0800, Ian Van Hoven wrote:
ArgumentError (wrong number of arguments (2 for 1))
this only started after i upgraded to 1.1.6.
what gives? any help appreciated, this basic method failing is doing a
great job of holding me up
I’d say that what is holding you up is not understanding what is
happening.
(wrong number of arguments (2 for 1) is like doing…
Person.find(1, 2)
which I think doesn’t work (haven’t tested it)
Person.find(:all, :conditions => [“id = ‘1’ || id = ‘2’”]) should work
You might want to show us the actual code.
Craig
think i figgered it out…
“records - a table named records seemed to cause duplicate entries to
be found by find”
my bad for naming a table Records in my jukebox app
apologies for the spam.