mirror of
https://github.com/samsonjs/grape-active_model_serializers.git
synced 2026-03-25 08:45:55 +00:00
Add information about accessing current_user
Fix. project using: - active_model_serializers - 0.9.3 - grape 0.13.0 - grape-active_model_serializers 1.3.2
This commit is contained in:
parent
ca9c8faaa9
commit
4347c8d7d3
1 changed files with 2 additions and 0 deletions
|
|
@ -151,6 +151,8 @@ class PostSerializer < ActiveModel::Serializer
|
|||
end
|
||||
```
|
||||
|
||||
*Note*: in the [0.9.x stable version of active model serializers](https://github.com/rails-api/active_model_serializers/tree/0-9-stable#customizing-scope), you have to access current user on scope - so `scope.current_user`.
|
||||
|
||||
### Full Example
|
||||
|
||||
```ruby
|
||||
|
|
|
|||
Loading…
Reference in a new issue