Skip to content

Commit

Permalink
Helper scope。
Browse files Browse the repository at this point in the history
  • Loading branch information
keikun17 committed Apr 14, 2016
1 parent ff3aa37 commit dd341d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/offer.rb
Expand Up @@ -70,6 +70,8 @@ class Offer < ActiveRecord::Base
scope :supplier_hidden_in_print, -> { where(hide_supplier_in_print: true) }
scope :services, -> { where(service: true) }
scope :supplies, -> { where.not(service: true) }
scope :not_from_stock, -> { where.not(from_stock: false) }
scope :from_stock, -> { where(from_stock: true) }

scope :pending_client_order, (lambda do
# (3) Or this way :
Expand Down

0 comments on commit dd341d1

Please sign in to comment.