Skip to content

Instantly share code, notes, and snippets.

@TechFounder
Created January 1, 2014 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TechFounder/8209090 to your computer and use it in GitHub Desktop.
Save TechFounder/8209090 to your computer and use it in GitHub Desktop.
How to add value to input area in rails form.
<div class="form-inputs">
<%= f.input :title, :input_html => { :value => "This is title field value." } %>
<%= f.input :body, :input_html => { :value => "This is body field value." } %>
</div>
or
<div class="form-inputs">
<%= f.input :title, input_html: { :value => "This is title field value." } %>
<%= f.input :body, input_html: { :value => "This is body field value." } %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment