Skip to content

Instantly share code, notes, and snippets.

@YumaInaura
Created October 5, 2015 08:31
Show Gist options
  • Save YumaInaura/8f1b0cd387bd4ab7d545 to your computer and use it in GitHub Desktop.
Save YumaInaura/8f1b0cd387bd4ab7d545 to your computer and use it in GitHub Desktop.
Rails: CanCanでアクションごとに権限を設定する方法 ref: http://qiita.com/Yinaura/items/1bc839089b627cc3865e
def initialize(user)
can :update, ExampleClass
can :create, ExampleClass
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment