-
-
Save tbuehlmann/3fb5c5682269454432498a8bde8768c6 to your computer and use it in GitHub Desktop.
can it be reduced to a one liner ?
This file contains hidden or 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
validate :relation_with_same_tenant | |
....... | |
private | |
def relation_with_same_tenant | |
if self.shop_id!=ui_listable.shop_id | |
self.errors.add(:ui_listable,"ERROR MESSAGE") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment