-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Url: /api/v1/videos?auth_token=11112323432432
In controllors/api/v1/videos
I can easily get the user from the auth_token. I want to then make it available in the presenter, ideally via render :json => present("videos") { videos, :extra => user }
Is it possible to pass variables to presenter?
render :json => present("videos") { Widget.visible_to(current_user) } does not work in this case, as in the presenter, I want to show different information, depending on the user
I am currently storing the user_id in a thread in a controller:
Thread.current[:user_id] = 1
and accessing that in the presenter, but this is far less than ideal.
Metadata
Metadata
Assignees
Labels
No labels