Sha256: 7be51f0f9579cb9eafd2bd349ef2c5805875f573e26b777267665c1e2ce456dc

Contents?: true

Size: 188 Bytes

Versions: 11

Compression:

Stored size: 188 Bytes

Contents

Spree::Order.class_eval do
  def self.find_by_param(param)
    if param.to_i > 0
      Spree::Order.find(param)
    else
      Spree::Order.where(:number => param).first
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree_api-1.0.7 app/models/order_decorator.rb
spree_api-1.0.6 app/models/order_decorator.rb
spree_api-1.0.4 app/models/order_decorator.rb
spree_api-1.0.3 app/models/order_decorator.rb
spree_api-1.0.2 app/models/order_decorator.rb
spree_api-1.0.1 app/models/order_decorator.rb
spree_api-1.0.0 app/models/order_decorator.rb
spree_api-1.0.0.rc4 app/models/order_decorator.rb
spree_api-1.0.0.rc3 app/models/order_decorator.rb
spree_api-1.0.0.rc2 app/models/order_decorator.rb
spree_api-1.0.0.rc1 app/models/order_decorator.rb