# Problem with Active Record find

**URL:** <https://www.ruby-forum.com/t/problem-with-active-record-find/157378>\
**Category:** Rails\
**Created:** [January 10, 2009, 8:22am UTC](https://www.ruby-forum.com/t/problem-with-active-record-find/157378 "2009-01-10T08:22:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naga\_harish\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Post date:** [January 10, 2009, 8:22am UTC](https://www.ruby-forum.com/t/problem-with-active-record-find/157378/1 "2009-01-10T08:22:30Z")

</div>

Hi all,  
I migrated my Rail version from 1.2.3 to 2.2.2  
I got one problem while going around.  
User.find(params[:id]) some times its returning Array and some times  
its returing User record.

If I see the log, some times its  
select \* from users where (‘users’.id in (1))

and some times its  
select \* from users where (‘users’.id = 1)

Why is this happening?  
And that also it returns Array when I run the include queries and run  
the general record User.find(params[:id])

Did any one faced this??  
My Ruby version is ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]  
Rails version is Rails 2.2.2

Is there any problem with the versions?
