Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Model < ApplicationRecord
  2. ...
  3. # Model.approved # this will only return records that are set to approved status
  4. scope :approved, ->{ where( status: 'approved') }
  5. ...
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement