Created
February 24, 2016 15:35
-
-
Save MichaelCPell/1ca86daf17b1493e620b 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
before_save do | |
if wiki.private == true | |
unless wiki.user.premium? | |
wiki.errors.add(:private, "Must be premium to make private wikis") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment