lib/ticketmaster/project.rb in ticketmaster-0.3.1 vs lib/ticketmaster/project.rb in ticketmaster-0.3.2
- old
+ new
@@ -126,9 +126,15 @@
def ticket(*options)
options.insert(0, id) if options.length > 0
easy_finder(self.class.parent::Ticket, :first, options, 1)
end
+ # Create a ticket
+ def ticket!(*options)
+ options[0].merge!(:project_id => id) if options.first.is_a?(Hash)
+ self.class.parent::Ticket.create(*options)
+ end
+
# Define some provider specific initalizations
def initialize(*options)
# @system_data = {'some' => 'data}
super(*options)
end