aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/public_body_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:26:54 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-17 05:26:54 +1100
commit5f6a7a29bc1ea3784728a9c57edfa4be73d4196f (patch)
tree5a1fffb45716a2383e589d2d55bc12fa2b0ca8d7 /app/controllers/public_body_controller.rb
parenta44431056ae75f1b2d83cb27971456d307180042 (diff)
Set locale with I18n rather than through globalize
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r--app/controllers/public_body_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 5391f62b2..5265706bf 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -71,7 +71,7 @@ class PublicBodyController < ApplicationController
@public_body = PublicBody.find_by_url_name_with_historic(params[:url_name])
raise ActiveRecord::RecordNotFound.new("None found") if @public_body.nil?
- PublicBody.with_locale(self.locale_from_params()) do
+ I18n.with_locale(self.locale_from_params()) do
if params[:submitted_view_email]
if verify_recaptcha
flash.discard(:error)
@@ -129,7 +129,7 @@ class PublicBodyController < ApplicationController
@description = _("in the category ‘{{category_name}}’", :category_name=>category_name)
end
end
- PublicBody.with_locale(@locale) do
+ I18n.with_locale(@locale) do
@public_bodies = PublicBody.paginate(
:order => "public_body_translations.name", :page => params[:page], :per_page => 100,
:conditions => conditions,