Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support for cancancan #1742

Closed
u007 opened this issue May 19, 2016 · 6 comments
Closed

feature: support for cancancan #1742

u007 opened this issue May 19, 2016 · 6 comments

Comments

@u007
Copy link

u007 commented May 19, 2016

Expected behavior vs actual behavior

anyway to pass in current_user, or current_ability from cancancan gem to determine the serialisable attributes?

Steps to reproduce

(e.g., detailed walkthrough, runnable script, example application)

maybe:
options = { ability: current_ability }
serialization = ActiveModelSerializers::SerializableResource.new(resource, options)

@cgmckeever
Copy link
Contributor

@u007 this PR surprised me with the ability of getting the controller current_user
#1734

Maybe it will lead you down the path you need?

@u007
Copy link
Author

u007 commented May 19, 2016

@cgmckeever nice :)
when will this be main stream?

@bf4
Copy link
Member

bf4 commented May 19, 2016

@cgmckeever
Copy link
Contributor

I think it is already in the 0.10 branch. Which version are you using?

@u007
Copy link
Author

u007 commented May 19, 2016

nice, ive 0.10 :)

@u007 u007 closed this as completed May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants