Commit a1c10223 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix controller status rubocop rules

parent d2686fe9
...@@ -21,8 +21,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController ...@@ -21,8 +21,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
@feature_flag = project.operations_feature_flags.create(create_params) @feature_flag = project.operations_feature_flags.create(create_params)
if @feature_flag.persisted? if @feature_flag.persisted?
flash[:notice] = 'Feature flag was successfully created.' redirect_to project_feature_flags_path(@project), status: 302, notice: 'Feature flag was successfully created.'
redirect_to project_feature_flags_path(@project)
else else
render :new render :new
end end
...@@ -33,8 +32,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController ...@@ -33,8 +32,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
def update def update
if feature_flag.update(update_params) if feature_flag.update(update_params)
flash[:notice] = 'Feature flag was successfully updated.' redirect_to project_feature_flags_path(@project), status: 302, notice: 'Feature flag was successfully updated.'
redirect_to project_feature_flags_path(@project)
else else
render :edit render :edit
end end
...@@ -42,10 +40,10 @@ class Projects::FeatureFlagsController < Projects::ApplicationController ...@@ -42,10 +40,10 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
def destroy def destroy
if feature_flag.destroy if feature_flag.destroy
flash[:notice] = 'Feature flag was successfully removed.' redirect_to project_feature_flags_path(@project), status: 302, notice: 'Feature flag was successfully removed.'
else
redirect_to project_feature_flags_path(@project), status: 302, alert: 'Feature flag was not removed.'
end end
redirect_to project_feature_flags_path(@project)
end end
protected protected
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment