ArgumentError (wrong number of arguments (2 for 1)):
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:941:in
`find_one'
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:941:in
`find_from_ids'
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:382:in
`find'
All I'm trying to do is fetch a row from the db & refer to columnar
data from that row (both in the controller & in the view). My current
workaround (ugly) is to use the :all & :conditions switches for the
find method, and then iterate over @foo to set variables as needed for
columnar data. Real ugly.
What am I missing here? Bit of a newbie, so apologies in advance if
it's painfully obvious.
ArgumentError (wrong number of arguments (2 for 1)):
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:941:in
`find_one'
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:941:in
`find_from_ids'
/usr/.../activerecord-1.14.4/lib/active_record/base.rb:382:in
`find'
Have you defined your own one-parameter find_one method in your model?
If so, rename.
A suggestion - I don't know if this will fix the snippet - but @params
is deprecated.
You should be using just params, without the instance var (@) prefix.