diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-04-24 11:12:54 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-04-24 11:12:54 +0100 |
commit | a5975915975f5f2b815ec1a20e3bcfaf78831add (patch) | |
tree | d09d671e79ae1d3e31cd9234ce835df33c2bd5ea /app/controllers/admin_public_body_controller.rb | |
parent | a244afcb7b7185905a7a16b37ae585e239e963ea (diff) | |
parent | d3aae5cc48c92473e06b2104bb9431305d5a92f0 (diff) |
Merge branch 'release/0.9' into wdtk
Diffstat (limited to 'app/controllers/admin_public_body_controller.rb')
-rw-r--r-- | app/controllers/admin_public_body_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/admin_public_body_controller.rb b/app/controllers/admin_public_body_controller.rb index bb5e98852..93715d364 100644 --- a/app/controllers/admin_public_body_controller.rb +++ b/app/controllers/admin_public_body_controller.rb @@ -14,7 +14,7 @@ class AdminPublicBodyController < AdminController def _lookup_query_internal @locale = self.locale_from_params() - PublicBody.with_locale(@locale) do + I18n.with_locale(@locale) do @query = params[:query] if @query == "" @query = nil @@ -75,7 +75,7 @@ class AdminPublicBodyController < AdminController def show @locale = self.locale_from_params() - PublicBody.with_locale(@locale) do + I18n.with_locale(@locale) do @public_body = PublicBody.find(params[:id]) render end @@ -87,7 +87,7 @@ class AdminPublicBodyController < AdminController end def create - PublicBody.with_locale(I18n.default_locale) do + I18n.with_locale(I18n.default_locale) do params[:public_body][:last_edit_editor] = admin_current_user() @public_body = PublicBody.new(params[:public_body]) if @public_body.save @@ -106,7 +106,7 @@ class AdminPublicBodyController < AdminController end def update - PublicBody.with_locale(I18n.default_locale) do + I18n.with_locale(I18n.default_locale) do params[:public_body][:last_edit_editor] = admin_current_user() @public_body = PublicBody.find(params[:id]) if @public_body.update_attributes(params[:public_body]) @@ -120,7 +120,7 @@ class AdminPublicBodyController < AdminController def destroy @locale = self.locale_from_params() - PublicBody.with_locale(@locale) do + I18n.with_locale(@locale) do public_body = PublicBody.find(params[:id]) if public_body.info_requests.size > 0 |