Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Honores parameter :locale in update_attributes (for globalize3).

  • Loading branch information...
commit c5d2b8e2ad48398a231fa2b693e6a8f2c3a19b9c 1 parent 0747925
Oleguer Huguet authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/on_the_spot/controller_extension.rb
View
4 lib/on_the_spot/controller_extension.rb
@@ -16,11 +16,11 @@ def can_edit_on_the_spot
Globalize.with_locale params[:locale] do
if params[:no_validate]
updated_ok = object.with_transaction_returning_status do
- object.attributes = {field => params[:value]}
+ object.attributes = {field => params[:value], :locale => params[:locale]}
object.save(:validate => false)
end
else
- updated_ok = object.update_attributes(field => params[:value])
+ updated_ok = object.update_attributes(field => params[:value], :locale => params[:locale])
end
if updated_ok

0 comments on commit c5d2b8e

Please sign in to comment.
Something went wrong with that request. Please try again.