Skip to content

Commit

Permalink
Added new ticket method
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed May 24, 2010
1 parent 1a3c280 commit a3bd0f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
class Resource < ActiveRecord::Base

def tickets(tag)
Lighthouse.account = name
Lighthouse::Ticket.find(:all, :params => { :project_id => project_id, :q => "state:open tagged:#{tag}" })
end

def ticket(number)
Lighthouse.account = self.name
Lighthouse::Ticket.find(number, :params => { :project_id => project_id})
end
end

0 comments on commit a3bd0f0

Please sign in to comment.