Module: Ticket::Foundry
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/ticket/foundry.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#build_tickets ⇒ Object
26 27 28 |
# File 'app/models/ticket/foundry.rb', line 26 def build_tickets foundry_template.collect(&:build).flatten end |
#create_tickets ⇒ Object
22 23 24 |
# File 'app/models/ticket/foundry.rb', line 22 def create_tickets Ticket.import(build_tickets) end |
#foundry_template ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'app/models/ticket/foundry.rb', line 30 def foundry_template if respond_to?(:foundry_using_next) template = next_template template.each { |template| template.update_attributes(foundry_attributes) } else Ticket::Template.new(foundry_attributes) end end |