已经转换设计从erb到Haml的新会话但是没有用,这是代码:
%div.row.show-grid %div.span8.offset7 %h1 Sign in - form_for(resource,:as => resource_name,:url => session_path(resource_name)) do |f| %div.clearfix = f.label :email %div.input = f.email_field :email,:class => 'xlarge',:id => 'admin_email' %div.clearfix = f.label :password %div.input = f.password_field :password,:id => 'admin_password' - if devise_mapping.rememberable? %div = f.check_Box :remember_me = f.label :remember_me %div = f.submit "Sign up"
这是最初的erb代码:
<div class="row show-grid"> <div class="span8 offset7"> <div class="page-header"> <h1>Sign in</h1> </div> <%= form_for(resource,:url => session_path(resource_name)) do |f| %> <div class="clearfix"> <%= f.label :email %> <div class="input"> <%= f.email_field :email,:id => 'admin_email' %> </div> </div> <div class="clearfix"> <%= f.label :password %> <div class="input"> <%= f.password_field :password,:id => 'admin_password' %> </div> </div> <% if devise_mapping.rememberable? -%> <div><%= f.check_Box :remember_me %> <%= f.label :remember_me %></div> <% end -%> <div><%= f.submit "Sign up" %></div> <% end %>