diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-17 05:26:54 +1100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-04-02 15:48:06 +0100 |
commit | 5d22285eef67627c58320f031d03d2bffd0ba55e (patch) | |
tree | 1893ffa86b52dacad9d606d0d392c78c13e69a0f /app/controllers/public_body_controller.rb | |
parent | 4dec7290c10537ebcccba491ba5dddcefd81e43a (diff) |
Set locale with I18n rather than through globalize
Conflicts:
app/controllers/general_controller.rb
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r-- | app/controllers/public_body_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 9e4f7c023..1821e6725 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -69,7 +69,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) @@ -127,7 +127,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, |