On 25 Feb 2011, at 15:30, Bryan Crossland wrote:

I'm pretty sure I've got the controller and model right, but I just need
to tell Rails to NOT look in the database for this model...

Any ideas?

Yes. As others have suggested correctly you do not need to inherit from ActiveRecord::Base in order to have a class in the models folder. Remove < ActiveRecord::Base from the top of your Avatar class. That will take care of it not looking into the database anymore for an Avatar table. After that you will need to write your own error handling for the areas where you were using AR's build in error handling. You'll see them pretty quick when you run your code. The will most likely show up as Undefined Method errors for "errors.add_to_base" and so on.

Or you could just "include ActiveModel::Validations" in your Avatar class and get both validations and error handling.


Best regards

Peter De Berdt

--
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.

Reply via email to