Forum: Ruby on Rails Problem with Active Record find

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Naga harish K. (Guest)
on 2009-01-10 09:22
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?
This topic is locked and can not be replied to.