Skip to content

Instantly share code, notes, and snippets.

@DiveInto DiveInto/scope.rb
Created Apr 15, 2012

What would you like to do?
scope rails
class SellInfo < ActiveRecord::Base
belongs_to :book
belongs_to :user
scope :onsale,:conditions => ['deal_status is not "sold"']
scope :saled,:conditions => {:deal_status => "sold"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.