module Countrizable::Persistence
Public Instance Methods
_create_record(attribute_names = self.attribute_names)
click to toggle source
Calls superclass method
# File lib/patches/active_record/persistence.rb, line 10 def _create_record(attribute_names = self.attribute_names) attribute_names_without_country_attributed = attribute_names.select{ |k| not respond_to?('country_attributed?') or not country_attributed?(k) } super(attribute_names_without_country_attributed) end
_update_record(attribute_names = self.attribute_names)
click to toggle source
Updates the associated record with values matching those of the instance attributes. Returns the number of affected rows.
Calls superclass method
# File lib/patches/active_record/persistence.rb, line 5 def _update_record(attribute_names = self.attribute_names) attribute_names_without_country_attributed = attribute_names.select{ |k| not respond_to?('country_attributed?') or not country_attributed?(k) } super(attribute_names_without_country_attributed) end