Module: Auth::Concerns::Work::GoodConcern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/auth/concerns/work/good_concern.rb
Overview
intended to be mixed into the product_class contains methods assuming that an item is going to be processed by using the modules provided by the work concern.
Instance Method Summary collapse
Instance Method Details
#as_json(options) ⇒ Object
31 32 33 34 |
# File 'app/models/auth/concerns/work/good_concern.rb', line 31 def as_json() ## includes the images associated with the object as well. super({:methods => [:embedded_document_path, :embedded_document, :summary, :images]}.merge()) end |
#build_summary ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'app/models/auth/concerns/work/good_concern.rb', line 20 def build_summary self.summary = [] self.instructions.each do |inst| self.summary << { :summary_icon_class => inst.summary_icon_class, :summary_text => inst.summary_text, :summary_icon_color => inst.summary_icon_color } if inst.include_in_summary == true end end |