scope
よくググるのでメモ scope :available, -> { where('deleted = false') } scope :available, -> { receivable.opened.showable } # 引数あり scope :find_by_friend_ids, -> friend_ids { where( target_id: friend_ids ) }
よくググるのでメモ scope :available, -> { where('deleted = false') } scope :available, -> { receivable.opened.showable } # 引数あり scope :find_by_friend_ids, -> friend_ids { where( target_id: friend_ids ) }