Recently I started using Rails Admin
for creating admin panel.
I am using devise for authentication. I need to access current_user in export action.
For virtual attributes in formatted_value
block I cannot reach current_user via bindings[:controller]._current_user
or bindings[:view]._current_user
. Inside bindings there is only object (bindings[:object])
and bindings[:controller]
does not exist.
How to access current_user
in export action?