This commit is contained in:
Vokhmin Alexey V 2014-03-26 00:40:19 +04:00
parent ea4d28d6d1
commit 9d62d732c6
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class ProductBuildList < ActiveRecord::Base
serialize :results, Array serialize :results, Array
scope :default_order, -> { order(updated_at: desc) } scope :default_order, -> { order(updated_at: :desc) }
scope :for_status, ->(status) { where(status: status) } scope :for_status, ->(status) { where(status: status) }
scope :for_user, ->(user) { where(user_id: user.id) } scope :for_user, ->(user) { where(user_id: user.id) }
scope :scoped_to_product_name, ->(product_name) { joins(:product).where('products.name LIKE ?', "%#{product_name}%") } scope :scoped_to_product_name, ->(product_name) { joins(:product).where('products.name LIKE ?', "%#{product_name}%") }