diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-12-10 00:09:55 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-12-11 11:09:38 +1100 |
commit | 1f8bc6560b5240a7aa84ac8d6bdc47eea5d2d781 (patch) | |
tree | 3d7ba35ab3080c9a19171158793202e561bea5f7 /app/controllers/public_body_controller.rb | |
parent | 9b60a7e72244b4b2ac917ba39b9e4081ef8d3e03 (diff) |
The with_locale has been removed in Globalize3
I think Globalize is supposed to pick up the locale from I18n anyway so I don't know if these are needed.
I think I still haven't done the right thing but it's time to move on.
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r-- | app/controllers/public_body_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 542a2a433..5265706bf 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_locales(@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? @@ -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_locales(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_locales(@locale) do + I18n.with_locale(@locale) do @public_bodies = PublicBody.paginate( :order => "public_body_translations.name", :page => params[:page], :per_page => 100, :conditions => conditions, |