Class: Tour
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Tour
- Extended by:
- FriendlyId
- Defined in:
- app/models/tour.rb
Defined Under Namespace
Classes: Translation
Instance Method Summary collapse
Instance Method Details
#translations_attributes=(attributes) ⇒ Object
38 39 40 41 42 43 |
# File 'app/models/tour.rb', line 38 def translations_attributes=(attributes) new_translations = attributes.values.reduce({}) do |new_values, translation| new_values.merge! translation.delete("locale") => translation end set_translations new_translations end |