Created
August 17, 2014 08:33
-
-
Save aishek/6d3822c69961f11f2f2f to your computer and use it in GitHub Desktop.
authorize! example
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
class PurchasesController | |
def create | |
purchase = Purchase.new :user => current_user | |
authorize! :create, purchase | |
# purchase create logic | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment