aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/public_body_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-16 19:07:54 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-16 19:07:54 +1100
commit16abab79f431a5a6fa3d5980ef7747135bd436a0 (patch)
tree00176b9607c2aaeccaaa08e13460356de1bbe53a /app/controllers/public_body_controller.rb
parentd938a330052d756889aeb4f2a77f1c6a2698021d (diff)
Set locale in controller test by passing parameter in get
Also using I18n.locale to pass the current locale around.
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r--app/controllers/public_body_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 8a4a65820..5391f62b2 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -16,7 +16,7 @@ class PublicBodyController < ApplicationController
return
end
@locale = self.locale_from_params()
- PublicBody.with_locale(@locale) do
+ I18n.with_locale(@locale) do
@public_body = PublicBody.find_by_url_name_with_historic(params[:url_name])
raise ActiveRecord::RecordNotFound.new("None found") if @public_body.nil?
if @public_body.url_name.nil?