Hi, Rails 2.3.5
Any ideas on the following error when calling create on an ActiveRecord object? NoMethodError (You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.clear): The create method is inside a Module that I want each of my Model classes to include. All of my DB tables follow the same structure, so I am trying to factor out the updating and searching of the tables to just a few Modules. My DB structure should allow it with a little clever coding. (Note: just finished reading Metaprogramming Ruby from PragProg. It has taught me a fair bit (still loads more to learn I guess), but I now want to refactor a current project as far as I can as a learning excercise). If I include the Modules in the Controllers so that each Controller gets all the functionality of the Modules, then the Controllers act 'on' the Model Classes and the create method succeeds, but when I move the Module to the Model, which is where it should really be so that the Model Class gets the methods itself, I get this error. Have I missed something with 'self'? The Class that calls create does exist, and the params passed to create are correct. (More info available if required to help fix) Many Thanks Paul -- 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.

