Sha256: 02c0afb9b9e0d85ac9eb7628734cb2c8676d114cd7b90fa7eac5d1cc0a8384d6

Contents?: true

Size: 204 Bytes

Versions: 3

Compression:

Stored size: 204 Bytes

Contents

module ShoppingCart
  class OrderInProgress < Rectify::Query
    def initialize id
      @id = id
    end

    def query
      Order.where(user_id: @id).in_progress.first.try(:decorate)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 app/queries/shopping_cart/order_in_progress.rb
shopping-cart-0.1.1 app/queries/shopping_cart/order_in_progress.rb
shopping-cart-0.1.0 app/queries/shopping_cart/order_in_progress.rb