Displaying 1 result from an estimated 1 matches for "is_required".
Did you mean:
if_required
2010 Jan 19
0
Print an asterisk along with required fields
...asterisk along with each required field.
Like most of the sites does.
But, if I have this information in my model (validates_presence_of), is
there a way to identify whether a field is required at the moment I am
rendering it in the view?
Something like:
<%= ''* '' if obj.name.is_required? %><%= f.label :name, ''Name''%>
Thanks in advance.
--
Bruno Grasselli
Blog: http://brunograsselli.com.br
Twitter: http://twitter.com/grasselli
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To pos...