validates_presence_of :field_name, :message => “message”; the
message shows up with the :field_name message concatenated.
how can i just show just the message and not the field_name?
Thanks
validates_presence_of :field_name, :message => “message”; the
message shows up with the :field_name message concatenated.
how can i just show just the message and not the field_name?
Thanks
You can’t, not using that syntax.
<% If !@record.errors_on(:field_name).empty? %>
OH NOES!
<% end %>
In your view, perhaps?
On Dec 28, 2007 12:00 PM, wheels [email protected] wrote:
validates_presence_of :field_name, :message => “message”; the
message shows up with the :field_name message concatenated.how can i just show just the message and not the field_name?
Thanks
–
Ryan B.
Feel free to add me to MSN and/or GTalk as this email.
wheels wrote:
validates_presence_of :field_name, :message => “message”; the
message shows up with the :field_name message concatenated.how can i just show just the message and not the field_name?
One way is to install the custom-err-msg plugin
– http://rubyforge.org/projects/custom-err-msg/ –
and prefix your message with a caret.
–
We develop, watch us RoR, in numbers too big to ignore.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs