Skip to content

Instantly share code, notes, and snippets.

@aishek
Created August 17, 2014 08:33
Show Gist options
  • Save aishek/6d3822c69961f11f2f2f to your computer and use it in GitHub Desktop.
Save aishek/6d3822c69961f11f2f2f to your computer and use it in GitHub Desktop.
authorize! example
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