Daniello wrote:> I''d like to add a new field on my partial template witch is not
> present in my database schema.
> I''d like to validate it like others text_fields from my database.
How
> can I do it??
You may want to add a virtual attribute in the model.
Model example:
attr_accessor :not_on_db
validates_presence_of :not_on_db,
validates_length_of :not_on_db, :within => 1..5
--
Posted via http://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---