On 2 August 2012 20:12, yaniv pr <[email protected]> wrote: > Hello, > > Using sqlite3, rails 3.2.2, ruby 1.9.3p125 (on windows XP) > > Having the record in the db: > > Shop.find(123) - returns the shop > Shop.where(:id => 123) - returns the shop > but > Shop.find_by_id(123) returns nil > same for find_by_name, etc.
What does the log show for the sql used when you do those? Colin > > So do all the dynamic finders (notice it returns nil for integer value and > for string values) > > Why aren't they defined? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/ln0jQMMdZpgJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
