mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:29:53 +01:00
Prefer render responders in settings controllers
This commit is contained in:
parent
6ff7b08f15
commit
50b925ec48
6 changed files with 8 additions and 8 deletions
|
@ -19,6 +19,6 @@ class Settings::PrivacyController < ApplicationController
|
|||
else
|
||||
flash[:error] = t(".error")
|
||||
end
|
||||
redirect_to settings_privacy_path
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,6 +14,6 @@ class Settings::ProfileController < ApplicationController
|
|||
flash[:error] = t(".error")
|
||||
end
|
||||
|
||||
redirect_to settings_profile_path
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class Settings::ThemeController < ApplicationController
|
|||
else
|
||||
flash[:error] = t(".error", errors: current_user.theme.errors.messages.flatten.join(" "))
|
||||
end
|
||||
redirect_to settings_theme_path
|
||||
render :edit
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
|
@ -13,7 +13,7 @@ describe Settings::PrivacyController, type: :controller do
|
|||
|
||||
it "renders the edit template" do
|
||||
subject
|
||||
expect(response).to render_template("edit")
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -43,7 +43,7 @@ describe Settings::PrivacyController, type: :controller do
|
|||
|
||||
it "redirects to the privacy settings page" do
|
||||
subject
|
||||
expect(response).to redirect_to(:settings_privacy)
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ describe Settings::ProfileController, type: :controller do
|
|||
|
||||
it "redirects to the edit_user_profile page" do
|
||||
subject
|
||||
expect(response).to redirect_to(:settings_profile)
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -61,7 +61,7 @@ describe Settings::ThemeController, type: :controller do
|
|||
|
||||
it "renders the edit template" do
|
||||
subject
|
||||
expect(response).to redirect_to(:settings_theme)
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -75,7 +75,7 @@ describe Settings::ThemeController, type: :controller do
|
|||
|
||||
it "renders the edit template" do
|
||||
subject
|
||||
expect(response).to redirect_to(:settings_theme)
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue