Fix indentation on README.

This commit is contained in:
Siong 2014-12-08 15:27:12 -08:00
parent 7f243c017d
commit 4d785b4754

View file

@ -128,15 +128,15 @@ In Grape, you can get the same behavior by defining a `current_user`
helper method: helper method:
```ruby ```ruby
helpers do helpers do
def current_user def current_user
@current_user ||= User.where( :access_token => params[:token]).first @current_user ||= User.where( :access_token => params[:token]).first
end
def authenticate!
error!('401 Unauthenticated', 401) unless current_user
end
end end
def authenticate!
error!('401 Unauthenticated', 401) unless current_user
end
end
``` ```
Then, in your serializer, you could show or hide some elements Then, in your serializer, you could show or hide some elements