Created
July 6, 2016 08:57
-
-
Save BillyParadise/845920e8046d10084b3b54e8fe6cfb3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model: | |
class Profile < ApplicationRecord { | |
... => ... | |
:plan_id => :integer, | |
:requestedplan => :integer | |
} | |
class Profile < ApplicationRecord | |
belongs_to :plan | |
scope :notnil, -> { where.not(requestedplan: nil)} | |
scope :changereq, -> { notnil.where('requestedplan != plan_id')} #*** | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment