lib/conekta/operations/where.rb in conekta-0.4.4 vs lib/conekta/operations/where.rb in conekta-0.4.5

- old
+ new

@@ -3,23 +3,16 @@ module Where module ClassMethods def where(params=nil) instance = ConektaObject.new url = Util.types[self.class_name.downcase].url - requestor = Requestor.new - response = requestor.request(:get, url,params) + response = Requestor.new.request(:get, url,params) instance.load_from(response) instance end + # <b>DEPRECATED:</b> Please use <tt>where</tt> instead. - def all(params=nil) - instance = ConektaObject.new - url = Util.types[self.class_name.downcase].url - requestor = Requestor.new - response = requestor.request(:get, url) - instance.load_from(response) - instance - end + alias_method :all, :where end def self.included(base) base.extend(ClassMethods) end end