Sha256: 6a5a2e86497b6b6b0c130db93f2093b1567c2c5ad3fd185d82092a8af97b33a0
Contents?: true
Size: 1.11 KB
Versions: 3
Compression:
Stored size: 1.11 KB
Contents
class Card class Director module CardMethods attr_writer :director delegate :validation_phase, :storage_phase, :integration_phase, :validation_phase_callback?, :integration_phase_callback?, to: :director def director @director ||= Director.fetch self end def prepare_for_phases reset_patterns include_set_modules end def identify_action @action = if trash && trash_changed? :delete elsif new_card? :create else :update end end def restore_changes_information # restores changes for integration phase # (rails cleared them in an after_create/after_update hook which is # executed before the integration phase) return unless saved_changes.present? @mutations_from_database = mutations_before_last_save end def clear_action_specific_attributes self.class.action_specific_attributes.each do |attr| instance_variable_set "@#{attr}", nil end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
card-1.104.2 | lib/card/director/card_methods.rb |
card-1.104.1 | lib/card/director/card_methods.rb |
card-1.104.0 | lib/card/director/card_methods.rb |