On 27 April 2013 11:40, Soichi Ishida <li...@ruby-forum.com> wrote: > rails 3.2.11 > > My app has User model, its one of the fields is entrepreneur:boolean. > > So users have two types; one is normal users, the other is professional > users. > > For normal users, only emails and usernames are required and other > fields are optional. > For professional users, in addition to above, addresses and real names > are required. > > Is there any Ruby way to set the requirement depending on the type of > users?
Are you talking about making the display change automatically immediately the user selects which sort of user he is? If so then probably javascript is the right way to do it. You could use ajax but that would require a request to the server so probably not a good plan. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.