new 页面放了外面的代码 不是自己生成的
OfficialWebsite
<!-- Bootstrap Core CSS -->
<!-- MetisMenu CSS -->
<!-- Custom CSS -->
<!-- Morris Charts CSS -->
<!-- Custom Fonts -->
Please Sign In
<%= render 'form', admin_session:
@session %>
<!-- jQuery -->
<!-- Bootstrap Core JavaScript -->
<!-- Metis Menu Plugin JavaScript -->
<!-- Custom Theme JavaScript -->
form 是这样的
<%= form_with(model: admin_session, url: admin_sessions_path, local: true, method: :post) do |form| %>
<% if admin_session.errors.any? %>
<%= pluralize(admin_session.errors.count, "error") %> prohibited this admin_session from being saved:
<% admin_session.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= form.label :email %>
<%= form.text_field :email, class: "form-control" %>
<%= form.label :password %>
<%= form.password_field :password, class: 'form-control' %>
<%= form.submit 'Sign In', class: 'btn btn-lg btn-success btn-block' %>
<% end %>