This one I cant seem to wrap my head around...
I have a form that I would like to bring up a :confirm => "are you sure
you want to change your username, doing so may make you foo up."
but only if a user changes that particular field.
So basically I have:
<tr>
<th><label for="user_name">User
name</label></th>
<td><%= f.text_field ''name''
%></td>
</tr>
<tr>
<th><label
for="user_email">Email</label></th>
<td><%= f.text_field ''email''
%></td>
</tr>
<tr><%= submit_tag("Save changes") %></tr>
is there something as easy as
validates_change_of :user_name
and if not, what would be a good suggestion an approaching this.
(that would be a nice validates addition if it doesnt exist!)
-daniel
--
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
-~----------~----~----~----~------~----~------~--~---