Reputation: 115
The following ruby code in my view is like this:
<%= f.text_field :email, :class => '' %>
It renders like this:
<input class="" id="user_email" name="user[email]" size="30" type="text" />
I want to be able to change the size and add a title tag which would look like this:
<input class="" id="user_email" name="user[email]" size="40" title="Your Email" type="text" />
Upvotes: 1
Views: 154
Reputation: 16441
For size, do :size => 40
You could try the same for :title
, but I've never seen it used.
<%= f.text_field :email, :class => '', :size => 40, :title => 'whatever' %>
Like I said, not sure if the title hash works.
Upvotes: 1