mirror of
https://github.com/samsonjs/grape-active_model_serializers.git
synced 2026-03-25 08:45:55 +00:00
Fix indentation on README.
This commit is contained in:
parent
7f243c017d
commit
4d785b4754
1 changed files with 8 additions and 8 deletions
|
|
@ -128,7 +128,7 @@ In Grape, you can get the same behavior by defining a `current_user`
|
|||
helper method:
|
||||
|
||||
```ruby
|
||||
helpers do
|
||||
helpers do
|
||||
def current_user
|
||||
@current_user ||= User.where( :access_token => params[:token]).first
|
||||
end
|
||||
|
|
@ -136,7 +136,7 @@ helper method:
|
|||
def authenticate!
|
||||
error!('401 Unauthenticated', 401) unless current_user
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Then, in your serializer, you could show or hide some elements
|
||||
|
|
|
|||
Loading…
Reference in a new issue