Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Model < ApplicationRecord
- ...
- # Model.approved # this will only return records that are set to approved status
- scope :approved, ->{ where( status: 'approved') }
- ...
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement