Class: Lighthouse::Ticket
- Defined in:
- lib/lighthouse.rb
Overview
Find tickets
Ticket.find(:all, :params => { :project_id => 44 })
Ticket.find(:all, :params => { :project_id => 44, :q => "state:closed tagged:committed" })
project = Project.find(44)
project.tickets
project.tickets(:q => "state:closed tagged:committed")
Creating a Ticket
ticket = Ticket.new(:project_id => 44)
ticket.title = 'asdf'
...
ticket. << 'ruby' << 'rails' << '@high'
ticket.save
Updating a Ticket
ticket = Ticket.find(20, :params => { :project_id => 44 })
ticket.state = 'resolved'
ticket..delete '@high'
ticket.save
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Instance Attribute Details
#tags ⇒ Object
168 169 170 171 |
# File 'lib/lighthouse.rb', line 168 def attributes['tag'] ||= nil @tags ||= tag.blank? ? [] : parse_with_spaces(tag) end |
Instance Method Details
#id ⇒ Object
163 164 165 166 |
# File 'lib/lighthouse.rb', line 163 def id attributes['number'] ||= nil number end |
#save_with_tags ⇒ Object
173 174 175 176 177 178 |
# File 'lib/lighthouse.rb', line 173 def self.tag = @tags.collect do |tag| tag.include?(' ') ? tag.inspect : tag end.join(" ") if @tags.is_a?(Array) @tags = nil ; end |