Reputation: 14798
I have a partial which includes a form, i have two different instances where i want to use this form, one if for editing and another one if for viewing only, i want to disable all of the fields in a second case. Is there any quick way to do it in rails? I know i can do it with jquery but i prefer to do it in rails.
Upvotes: 0
Views: 888
Reputation: 10018
You can wrap all elements in with_options :disabled => 'disabled' do
method.
Upvotes: 2