All -
Trying not to fight rails on this, basically have a form and all the same as would be with an ActiveRecord model except that there is no table. I started out using this article:
…which is kind of a hack by inheriting ActiveRecord in to non-AR model but am running into some problems and just have the feeling that I am fighting rails and going to spend more time on this than the benefit warrants.
All am looking to do is receive and validate form input, and ideally have the luxuries like Class.new(params[:object]), Class.update_attributes(params[:object]), and for the form to do similar highlighting and error feedback messages as AR.
It works perfectly in Rails 2.3.8, it might break in Rails 3 I haven’t
tested yet.
Thanks Fernando. That is exactly what I was doing (but getting an error) but your telling me it works perfectly for you made me look further and I found an error in a field name that I was validating — so now all works well. Good to have confirmation that this structure is being used successfully by others.