lib/provider/fogbugz.rb in ticketmaster-fogbugz-0.1.2 vs lib/provider/fogbugz.rb in ticketmaster-fogbugz-0.1.3
- old
+ new
@@ -38,14 +38,11 @@
def projects(*options)
Project.find(options)
end
def project(*options)
- unless options.first.is_a? Fixnum
- raise "Search for a single project only works with a project id"
- else
- Project.find_by_id(options.first)
- end
+ id = options.empty? ? 0 : options.first.to_i
+ Project.find_by_id(id)
end
def valid?
begin
@fogbugz.command(:search, :q => 'case')