fixing conflicts [#8]
This commit is contained in:
9
app/controllers/registrations_controller.rb
Normal file
9
app/controllers/registrations_controller.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class RegistrationsController < Devise::RegistrationsController
|
||||
|
||||
private
|
||||
|
||||
def sign_up_params
|
||||
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation)
|
||||
end
|
||||
|
||||
end
|
||||
9
app/views/devise/menu/_login_items.html.erb
Normal file
9
app/views/devise/menu/_login_items.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if user_signed_in? %>
|
||||
<li>
|
||||
<%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= link_to('Login', new_user_session_path) %>
|
||||
</li>
|
||||
<% end %>
|
||||
@@ -3,9 +3,20 @@
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :first_name %><br />
|
||||
<%= f.text_field :first_name, autofocus: true %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :last_name %><br />
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %>
|
||||
<%= f.email_field :email %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<body style="margin-left:50px">
|
||||
<p class="alert"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
|
||||
<%= render 'devise/menu/login_items' %>
|
||||
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user