1
我正在使用Devise进行身份验证。尝试使用simple_form编辑/创建设计表单。记住我不工作简单表格
这
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), :html=>{:class=>"form-vertical"}) do |f| %>
<%= f.input :email, :placeholder=>"Email", :label=>false %>
<%= f.input :password, :placeholder=>"Password", :label=>false %>
<% if devise_mapping.rememberable? -%>
<div style="display:inline"><%= f.input :remember_me, :inline_label => 'Yes, remember me'%></div>
<%end -%>
<div><%= f.submit "Sign in", :class=>"pull-right btn btn-primary" %></div>
<div><%= link_to "Create an account", new_user_registration_path%></div>
<% end %>
简直是给我的; 记住,这应该是复选框
它看起来像它给你的输入字段为好。你确定你有正确的数据类型来使'simple_form'和'devise'给你一个复选框吗? – tkone 2012-07-26 17:54:06
我刚刚取代'f.check_box',它的默认设计视图 – 2012-07-26 17:56:19
是否奏效? (一个字符) – tkone 2012-07-26 17:57:19