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

Add basic support for 'current_user' #12

Merged
merged 2 commits into from Dec 12, 2013
Merged

Add basic support for 'current_user' #12

merged 2 commits into from Dec 12, 2013

Conversation

kpassapk
Copy link

@kpassapk kpassapk commented Oct 8, 2013

It doesn't let you change the name of the current_user-like method (e.g. current_admin or something).

This was mentioned in issue #10.

@jrhe
Copy link
Member

jrhe commented Oct 8, 2013

Can you write test for this? Then I will merge in :D

@kpassapk
Copy link
Author

kpassapk commented Oct 8, 2013

Sure 👍

current_user.roles.member? :admin
end
end
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to see an example for an endpoint, how the code would look like.

@jeromegn
Copy link

I'd really like to use that. Please write some tests! 👍

jrhe added a commit that referenced this pull request Dec 12, 2013
Add basic support for 'current_user'
@jrhe jrhe merged commit c41e240 into ruby-grape:master Dec 12, 2013
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

Successfully merging this pull request may close these issues.

3 participants