Skip to content

Commit

Permalink
Remove devise defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Shannarra committed Jul 29, 2024
1 parent 084e081 commit 18c291d
Show file tree
Hide file tree
Showing 23 changed files with 300 additions and 380 deletions.
11 changes: 0 additions & 11 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,4 @@

class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :authenticate_user!

before_action :configure_permitted_parameters, if: :devise_controller?

protected
USER_ADDITIONAL_ATTRIBUTES = %i[name phone address image]

def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: USER_ADDITIONAL_ATTRIBUTES)
devise_parameter_sanitizer.permit(:account_update, keys: USER_ADDITIONAL_ATTRIBUTES)
end
end
3 changes: 0 additions & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

<div class="container-fluid">
<div class="row flex-nowrap">
<% if current_user %>
<%= render 'partials/sidebar' %>
<% end %>
<div class="col py-3">
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
Expand Down
12 changes: 0 additions & 12 deletions app/views/partials/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,5 @@
</li>
</ul>
<hr>
<div class="dropdown pb-4">
<a href="#" class="d-flex align-items-center text-white text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false">
<%= image_tag(current_user&.image || "https://github.com/mdo.png", {alt: 'image', width: '30', height: '30', class: 'rounded-circle'}) %>
<span class="d-none d-sm-inline mx-1"><%= current_user&.name || "Username" %></span>
</a>
<ul class="dropdown-menu dropdown-menu-dark text-small shadow">
<li><%=link_to("New ...", root_url, { class: "dropdown-item" }) %></li>
<li>
<hr class="dropdown-divider">
</li>
</ul>
</div>
</div>
</div>
46 changes: 0 additions & 46 deletions app/views/users/_form.html.erb

This file was deleted.

16 changes: 0 additions & 16 deletions app/views/users/confirmations/new.html.erb

This file was deleted.

9 changes: 0 additions & 9 deletions app/views/users/edit.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/users/index.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/users/mailer/confirmation_instructions.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/users/mailer/email_changed.html.erb

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/users/mailer/password_change.html.erb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/users/mailer/reset_password_instructions.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/users/mailer/unlock_instructions.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/users/my_profile.html.erb

This file was deleted.

25 changes: 0 additions & 25 deletions app/views/users/passwords/edit.html.erb

This file was deleted.

16 changes: 0 additions & 16 deletions app/views/users/passwords/new.html.erb

This file was deleted.

58 changes: 0 additions & 58 deletions app/views/users/registrations/edit.html.erb

This file was deleted.

43 changes: 0 additions & 43 deletions app/views/users/registrations/new.html.erb

This file was deleted.

45 changes: 0 additions & 45 deletions app/views/users/sessions/new.html.erb

This file was deleted.

15 changes: 0 additions & 15 deletions app/views/users/shared/_error_messages.html.erb

This file was deleted.

25 changes: 0 additions & 25 deletions app/views/users/shared/_links.html.erb

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/users/show.html.erb

This file was deleted.

Loading

0 comments on commit 18c291d

Please sign in to comment.