diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-16 19:07:54 +1100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-04-02 15:38:14 +0100 |
commit | 7106744372abce3c00dd326d4bc5d5ce5cac9d78 (patch) | |
tree | 8caaec66039956306291c67af872e1da61b76a86 /app/controllers/public_body_controller.rb | |
parent | e576ac11a9a9de4f574585d2f05c566d79d8a213 (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.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index aa6980b69..9e4f7c023 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? |