search for: retrieve_model

Displaying 1 result from an estimated 1 matches for "retrieve_model".

2013 Nov 18
1
wrong number of arguements (1 for 0) on ActiveRecord::Base#send
...39;'m not exactly using Rails, but just ActiveRecord. Though I felt this would be more appropriate in the Rails forum than the general Ruby forum. I''m working on an app that interacts with databases, without having a database of its own. I have a class called Modeller, and a Modeller#retrieve_model(name) method that takes a name, looks for a table matching that name, creates a model that inherits from ActiveRecord::Base and returns it. It works great. So I can enter: m = Modeller.new(<params for connecting to db>) model = m.retrieve_model(''page'') And I get back...