# Active\_record issues following upgrade to rails 1.1.6

**URL:** <https://www.ruby-forum.com/t/active-record-issues-following-upgrade-to-rails-1-1-6/72719>\
**Category:** Rails\
**Created:** [October 18, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/active-record-issues-following-upgrade-to-rails-1-1-6/72719 "2006-10-18T14:45:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [October 18, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/active-record-issues-following-upgrade-to-rails-1-1-6/72719/1 "2006-10-18T14:45:53Z")

</div>

hello,

controller code that was working fine prior to the upgrade…

```
@foo = Foo.find( @params[:id] )
@bar = Bar.find( @foo.id_bar )

```

…is now throwing following error messages…

```
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.

Cheers,

-ian

---

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [October 18, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/active-record-issues-following-upgrade-to-rails-1-1-6/72719/2 "2006-10-18T16:58:54Z")

</div>

Ian Van Hoven wrote:

> ```
> /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.

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [October 18, 2006, 9:39pm UTC](https://www.ruby-forum.com/t/active-record-issues-following-upgrade-to-rails-1-1-6/72719/3 "2006-10-18T21:39:06Z")

</div>

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.

See:  
[http://glu.ttono.us/articles/2006/08/30/guide-things-you-shouldnt-be-doing-in-rails](http://glu.ttono.us/articles/2006/08/30/guide-things-you-shouldnt-be-doing-in-rails)
