Re: Validations for non-ActiveRecord Model Objects

Peter Donald
Tue, 06 Dec 2005 03:10:32 -0000

Hi,

It turns out that there is a wiki page[1] that already describes this
technique. Who knew? :) It is a little dated but I wish I had wiki''ed
before attempting this ;)

[1]
http://wiki.rubyonrails.com/rails/pages/HowToUseValidationsWithoutExtendingActiveRecord


On 12/3/05, Peter Donald
<peter.j.donald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Hi,
>
> I just worked on getting validations for non-ActiveRecord model
> objects working. I essentially implemented an ActiveForm object that
> you can subclass for your own non-database form objects. The file is
> available from my blog [1] and I wouldn''t mind some feedback on
> whether my assumptions are right. It seems to work for me and makes it
> much easier to write non-database bound forms.
>
> [1]
http://www.realityforge.org/articles/2005/12/02/validations-for-non-activerecord-model-objects
>
> --
> Cheers,
>
> Peter Donald
>


--
Cheers,

Peter Donald