我设置了以下表单以将 Twitter 引导样式与 simple_form gem 一起使用。但是,正如您在下面看到的,“wrapper_html”命令在编译后的 css 中可见,并且未应用 Twitter 引导样式。有谁知道出了什么问题?
<div class="formbox">
<h2>Sign Up To Hang Out With Some Losers<h2>
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<%= f.input :email, :label => false, :placeholder => 'youremail@example.com', :wrapper_html => { :class => 'paddingmarg'} %>
<%= f.submit "Get an invite", :wrapper_html => { :class => 'btn.btn-primary', :id => "invitation_button" } %>
<% end %>
</div>
编译后的 CSS....
<input name="commit" type="submit" value="Get an invite" wrapper_html="{:class=>"btn.btn-primary", :id=>"invitation_button"}">