On Mon, Mar 7, 2011 at 8:48 PM, tinkerer13 <[email protected]> wrote:
> Right, but the docs for ActiveRecord::Base show that it derives from > Object, so there's no "where" method in the chain anywhere. So I > don't think it's inherited. > > Start a Rails 3 app. Create a model called Foo without inheriting ActiveRecord. class Foo end Start the Rails console: rails console Run the following command: Foo.methods.sort These are all the methods available to the class from just being in Rails. The "where" method is not among them. Exit the console and edit the class to inherit ActiveRecord::Base. class Foo < ActiveRecord::Base end Start the console again and re-run the command. In the bottom of that list you will find the method "where", inherited from ActiveRecord::Base. B. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en.

