Skip to content

Commit

Permalink
chore: custom controllers for Devise
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellberg committed Mar 30, 2024
1 parent 4dec64e commit 7e87de5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 31 deletions.
2 changes: 2 additions & 0 deletions app/controllers/users/registrations_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Users::RegistrationsController < Devise::RegistrationsController
end
2 changes: 2 additions & 0 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Users::SessionsController < Devise::SessionsController
end
File renamed without changes.
File renamed without changes.
60 changes: 30 additions & 30 deletions config/locales/kiqr.en.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
en:
devise:
partials:
navigations:
protected:
dashboard: "Dashboard"
public:
home: "Home"
sign_in: "Sign in"
register: "Create account"
settings:
account_settings: "Account settings"
user_settings: "Login & security"
items:
account:
label: "Profile settings"
description: "Edit your account profile"
user:
label: "Login credentials"
description: "Change user email or password."
accounts:
edit:
title: "Profile settings"
description: "Edit your account profile"
update:
success: "Your account profile has been updated successfully."
form:
name:
personal: "Your full name"
team: "Team / organization name"
submit_button: "Save changes"
users:
sessions:
new:
heading:
Expand Down Expand Up @@ -30,32 +59,3 @@ en:
submit_button: "Create your account"
already_have_account: Already have an account?
sign_in: Sign in!
accounts:
edit:
title: "Profile settings"
description: "Edit your account profile"
update:
success: "Your account profile has been updated successfully."
form:
name:
personal: "Your full name"
team: "Team / organization name"
submit_button: "Save changes"
partials:
navigations:
protected:
dashboard: "Dashboard"
public:
home: "Home"
sign_in: "Sign in"
register: "Create account"
settings:
account_settings: "Account settings"
user_settings: "Login & security"
items:
account:
label: "Profile settings"
description: "Edit your account profile"
user:
label: "Login credentials"
description: "Change user email or password."
5 changes: 4 additions & 1 deletion config/routes/authentication.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Devise routes for user authentication
devise_for :users, path_names: {sign_in: "login", sign_up: "create-account"}
devise_for :users, path_names: {sign_in: "login", sign_up: "create-account"}, controllers: {
registrations: "users/registrations",
sessions: "users/sessions"
}

# User personal accounts.
scope module: :users, path: :users do
Expand Down

0 comments on commit 7e87de5

Please sign in to comment.