2

请指导我解决注册和登录视图中的这些错误

<div class="jumbotronsignup">
  <div class="container">        


    <div class="row">

      <div class="col-md-4 col-md-offset-4 labelcolor">

      <h3>SIGN UP</h3>

        <%= form_for(@user) do |f| %>

          <%= render 'shared/error_messages', object: f.object %>

          <%= f.label :name %>
          <%= f.text_field :name, autofocus: true , class: 'form-control' %>

          <%= f.label :email %>
          <%= f.text_field :email, class: 'form-control' %>

          <%= f.label :password %>
          <%= f.password_field :password, autocomplete: "off", class: 'form-control' %>

          <%= f.label :password_confirmation, "Password Confirmation" %>
          <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>

          <div>
          <%= f.label :is_female, "Gender" %>
          <%= f.select :is_female,  User::GENDER_TYPES , {}, { :class => 'form-control' } %>
          </div>


          <div>
          <%= f.label :date_of_birth, :class=>'singleline' %>
          <%= f.date_select :date_of_birth, { :start_year => 1920, :end_year => 2010 }, :class => 'form-control date-select datetest' %>
          </div>

          <div>
            <%= f.label :avatar , "Profile Picture" %>
            <%= f.file_field :avatar, accept: 'image/jpeg,image/gif,image/png,image/tiff', class: 'form-control' %>
          </div>

          <div class="row text-center">
          <%= f.submit "Create my account", class: "btn mybtn-primary btn-lg" %>
          </div>

        <% end %>

      </div> 

    </div>    


  </div><!-- end of container -->

</div><!-- end of jumbotron --> 

我该如何解决这个错误?

在此处输入图像描述

这是我的登录页面

<div class="jumbotronsignup">
  <div class="container">        


    <div class="row">

      <div class="col-md-4 col-md-offset-4 labelcolor">

      <h3>LOG IN</h3>

        <%= form_for(:session, url: login_path) do |f| %>

          <%= f.label :email %>
          <%= f.text_field :email, class: 'form-control' %>

          <%= f.label :password %>
          <%= link_to "(forgot password)", new_password_reset_path %>
          <%= f.password_field :password, class: 'form-control' %>

          <%= f.label :remember_me, class: "checkbox inline" do %>
            <%= f.check_box :remember_me %>
            <span>Remember me on this computer</span>
          <% end %>

          <div class="row text-center">
          <%= f.submit "Log in", class: "btn mybtn-primary btn-lg" %>
          <p>New user? <%= link_to "Sign up now!", signup_path %></p>
          </div>

        <% end %>


      </div> 

    </div>    


  </div><!-- end of container -->
</div><!-- end of jumbotron --> 

在此处输入图像描述

4

0 回答 0