Ruby On Rails: make text field non-editable and display another field while editing a record
- 阅读更多 关于 Ruby On Rails: make text field non-editable and display another field while editing a record
问题 1.How can i make a text field non-editable (readable=false) while editing record My Form View Code <div class="field"> <%= f.label t :profile_name %><br /> <%= f.text_field :profile_name %> </div> 2.How can i make a field visible while editing a record. I have a field in the database table that i just want to display to fill in while editing the record however while create a new record that field not be visible. RESOLVED: Never Mind Guys i got the solution, 1. <div class="field"> <%= f.label