On Mar 17, 10:04 pm, Heinz Strunk <[email protected]>
wrote:
> Hey,
>
> both are actually pretty good approaches I think but I was hoping I
> could use that could use error_messages_for for the text_field_tag...
> that's probably not the case?
> If I was using "if not_good(params..." I'd need to display it
> differently. It'd be extremly handy if I could just add an error to
> error_messages_for using "if not_good(..."

You can call some_object.errors.add(...) to add errors to an
activerecord object (you probably need to make the validations run
first). Check out the errors class in the api.

Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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