Permalink
Browse files

rename key to locale to make set_translations more readable

  • Loading branch information...
1 parent 182f72a commit 614bb99a9be7c6b3f64e799a83170c622e6d33a0 Sven Fuchs committed Dec 26, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/globalize/active_record.rb
@@ -171,10 +171,10 @@ def translated_attributes
end
def set_translations(options)
- options.keys.each do |key|
- translation = translations.find_by_locale(key.to_s) ||
- translations.build(:locale => key.to_s)
- translation.update_attributes!(options[key])
+ options.keys.each do |locale|
+ translation = translations.find_by_locale(locale.to_s) ||
+ translations.build(:locale => locale.to_s)
+ translation.update_attributes!(options[locale])
end
end

0 comments on commit 614bb99

Please sign in to comment.