lib/sugarcrm/base.rb in sugarcrm-0.9.4 vs lib/sugarcrm/base.rb in sugarcrm-0.9.5

- old
+ new

@@ -37,11 +37,11 @@ options = args.extract_options! validate_find_options(options) case args.first when :first then find_initial(options) - when :all then find_every(options) + when :all then Array.wrap(find_every(options)) else find_from_ids(args, options) end end # A convenience wrapper for <tt>find(:first, *args)</tt>. You can pass in all the @@ -330,10 +330,10 @@ def ==(comparison_object) comparison_object.instance_of?(self.class) && id.present? && comparison_object.id == id end - + alias :eql? :== # Delegates to id in order to allow two records of the same type and id to work with something like: # [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ] def hash id.hash \ No newline at end of file