aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_censor_rule_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-03-19 14:52:55 -0700
committerLouise Crow <louise.crow@gmail.com>2013-03-19 14:52:55 -0700
commit0adcb32b81002528ea27855e2303118cbe9aefc1 (patch)
treec0f3efbf627045d9443e6ff3fadcb40e8e85dbdc /app/controllers/admin_censor_rule_controller.rb
parent844351acd314467dae44af0e10847dfd597fcc03 (diff)
parentf83b917ec2c59da0ce7c27da19b740366da58419 (diff)
Merge branch 'release/0.8'
Diffstat (limited to 'app/controllers/admin_censor_rule_controller.rb')
-rw-r--r--app/controllers/admin_censor_rule_controller.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/admin_censor_rule_controller.rb b/app/controllers/admin_censor_rule_controller.rb
index 5381921bf..d3e9e47d2 100644
--- a/app/controllers/admin_censor_rule_controller.rb
+++ b/app/controllers/admin_censor_rule_controller.rb
@@ -10,7 +10,7 @@ class AdminCensorRuleController < AdminController
@info_request = InfoRequest.find(params[:info_request_id])
end
if params[:user_id]
- @user = User.find(params[:user_id])
+ @censor_user = User.find(params[:user_id])
end
end
@@ -26,9 +26,9 @@ class AdminCensorRuleController < AdminController
end
flash[:notice] = 'CensorRule was successfully created.'
if !@censor_rule.info_request.nil?
- redirect_to admin_url('request/show/' + @censor_rule.info_request.id.to_s)
+ redirect_to admin_request_show_url(@censor_rule.info_request)
elsif !@censor_rule.user.nil?
- redirect_to admin_url('user/show/' + @censor_rule.user.id.to_s)
+ redirect_to admin_user_show_url(@censor_rule.user)
else
raise "internal error"
end
@@ -53,9 +53,9 @@ class AdminCensorRuleController < AdminController
end
flash[:notice] = 'CensorRule was successfully updated.'
if !@censor_rule.info_request.nil?
- redirect_to admin_url('request/show/' + @censor_rule.info_request.id.to_s)
+ redirect_to admin_request_show_url(@censor_rule.info_request)
elsif !@censor_rule.user.nil?
- redirect_to admin_url('user/show/' + @censor_rule.user.id.to_s)
+ redirect_to admin_user_show_url(@censor_rule.user)
else
raise "internal error"
end
@@ -79,9 +79,9 @@ class AdminCensorRuleController < AdminController
flash[:notice] = "CensorRule was successfully destroyed."
if !info_request.nil?
- redirect_to admin_url('request/show/' + info_request.id.to_s)
+ redirect_to admin_request_show_url(info_request)
elsif !user.nil?
- redirect_to admin_url('user/show/' + user.id.to_s)
+ redirect_to admin_user_show_url(user)
else
raise "internal error"
end