Module: Globalize::Persistence
- Defined in:
- lib/patches/active_record/persistence.rb
Instance Method Summary collapse
- #_create_record(attribute_names = self.attribute_names) ⇒ Object
-
#_update_record(attribute_names = self.attribute_names) ⇒ Object
Updates the associated record with values matching those of the instance attributes.
Instance Method Details
#_create_record(attribute_names = self.attribute_names) ⇒ Object
10 11 12 13 |
# File 'lib/patches/active_record/persistence.rb', line 10 def _create_record(attribute_names = self.attribute_names) attribute_names_without_translated = attribute_names.select{ |k| not respond_to?('translated?') or not translated?(k) } super(attribute_names_without_translated) end |
#_update_record(attribute_names = self.attribute_names) ⇒ Object
Updates the associated record with values matching those of the instance attributes. Returns the number of affected rows.
5 6 7 8 |
# File 'lib/patches/active_record/persistence.rb', line 5 def _update_record(attribute_names = self.attribute_names) attribute_names_without_translated = attribute_names.select{ |k| not respond_to?('translated?') or not translated?(k) } super(attribute_names_without_translated) end |