I have a model called Well in my app stored in well.rb under app/models. This has worked fine for quite some time. All of a sudden I noticed that the whole Well section (model/controller/view) was behaving strangely. I have tracked it down to the model not being recognized as an ActiveRecord::Base object. I have reduced the model to its minimum, here it is: app/models/well.rb class Well < ActiveRecord::Base end When I load the Rails console and run Well.superclass I get "Object" in response. While every other model correctly returns ActiveRecord::Base type in response to superclass method call, e.g., User.superclass Is there something obvious that I may be missing? Thanks for your time in advance. Bharat -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I had a similar ActiveRecord issue and the problem actually stemmed from changing one of my gems from: gem ''will_paginate'', ''3.0.pre2'' to: gem "will_paginate", "~> 3.0.2" can you post your gemfile? -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Mike. A big mistake on my part. I had forgotten that I had defined a scratch class called Well (what else?) in my lib folder for some computations. This well class does not have an ancestor and therefore naturally inherits from Object. It turned out that it was overriding my model class definition. I do appreciate your time though :) And apologies for the trouble. Bharat -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.