Refactor settings routes and menu
Use sub controllers/routes for the sections
This commit is contained in:
6
app/controllers/settings/profile_controller.rb
Normal file
6
app/controllers/settings/profile_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Settings::ProfileController < SettingsController
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
end
|
||||
13
app/controllers/settings/security_controller.rb
Normal file
13
app/controllers/settings/security_controller.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Settings::SecurityController < SettingsController
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def reset_password
|
||||
current_user.send_reset_password_instructions
|
||||
sign_out current_user
|
||||
msg = "We have sent you an email with a link to reset your password."
|
||||
redirect_to check_your_email_path, notice: msg
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user