This is something I''ve also noticed missing in Rails, sometimes forms
just don''t directly map directly to AR objects
The form input helpers might also need some changes but I haven''t tried
to use them without AR objects
Michael Campbell wrote:
>Is there a common/accepted pattern for validating form data and
>letting the user know something (s)he did was verboten?
>
>I see the AR validation stuff, but I don''t necessarily want that;
this
>is form data coming into controllers, which will validate what the
>user did, then (possibly) build AR''s from that, or possibly not.
>
>In any case, is there a framework supported way (or at least a common
>pattern) to doing this, and then return some possibly
>fieldname-indexed hash of errors so that the action can re-render the
>page with the appropriate "don''t do that" messages?
>
>I can roll my own, but wanted to use prior art if such exists.
>
>Thanks,
>
>Michael
>_______________________________________________
>Rails mailing list
>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
>
>