我有代码
<%= form_for(@user) do |f| %> <div> <%= f.label :email,:class=>'inline betaLabelTextField' %> <%= f.text_field :email,:class=>'betaTextField' %> </div> <% end %>
<div> <label class="inline betaLabelTextField" for="user_email">Email</label> <input class="betaTextField" id="user_email" name="user[email]" size="30" type="text" /> </div>
解决方法
最简单的方法是改为:
<%= form_for(@user) do |f| %> <div> <%= f.label :email,"Email Address",:class=>'betaTextField' %> </div> <% end %>