我正在努力将simple_form格式添加到简单的登录和注册表单中。
虽然注册表单格式正确 - 登录表单没有输入?
登录表单
我的代码在github(here)上可用,推送的最新版本包含此错误。对新手的任何想法?
答案 0 :(得分:0)
将<%
替换为<%=
声明旁边的f.input
。
<h2>Sign in</h2>
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), html: { class: 'form-horizontal'}) do |f| %>
<%= f.input :email %>
<%= f.input :password %>
<%= f.input :remember_me, as: :boolean %>
<div class="form-actions">
<%= f.submit "Sign in", class: "btn btn-primary" %>
</div>
<% end %>
<%= render "devise/shared/links" %>