lib/ticketmaster/project.rb in ticketmaster-0.4.3 vs lib/ticketmaster/project.rb in ticketmaster-0.4.5
- old
+ new
@@ -55,21 +55,21 @@
def self.find(*options)
first = options.shift
attributes = options.shift
if first.nil? or (first == :all and attributes.nil?)
self.find_by_attributes
- elsif first.is_a? Fixnum
- self.find_by_id(first)
elsif first.is_a? Array
first.collect { |id| self.find_by_id(id) }
elsif first == :first
projects = attributes.nil? ? self.find_by_attributes : self.find_by_attributes(attributes)
projects.first
elsif first == :last
projects = attributes.nil? ? self.find_by_attributes : self.find_by_attributes(attributes)
projects.last
elsif first == :all
self.find_by_attributes(attributes)
+ else
+ self.find_by_id(first)
end
end
# The first of whatever project
def self.first(*options)