Module: EffectiveProductsStampWizard
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/effective_products_stamp_wizard.rb
Overview
EffectiveProductsStampWizard
Mark your owner model with effective_products_stamp_wizard to get all the includes
Defined Under Namespace
Modules: Base, ClassMethods
Instance Method Summary
collapse
Instance Method Details
#assign_pricing ⇒ Object
119
120
121
122
123
124
125
126
127
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 119
def assign_pricing
raise('assign_pricing() to be implemented by including class')
end
|
#build_stamp ⇒ Object
115
116
117
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 115
def build_stamp
stamps.build(owner: owner, name: owner.to_s.presence)
end
|
#done? ⇒ Boolean
107
108
109
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 107
def done?
submitted?
end
|
#in_progress? ⇒ Boolean
103
104
105
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 103
def in_progress?
draft?
end
|
#stamp ⇒ Object
111
112
113
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 111
def stamp
stamps.first
end
|
#stamp_categories ⇒ Object
#to_s ⇒ Object
95
96
97
|
# File 'app/models/concerns/effective_products_stamp_wizard.rb', line 95
def to_s
(persisted? || destroyed?) ? "#{model_name.human} ##{id_was}" : model_name.human
end
|