codeplant/simple-navigation

Is there a way to get access to devise current_user somehow?

Rubytastic2 opened this issue · 2 comments

I need to do some conditional styling but it seems i have no access to current_user from devise from the navigation.rb files. Is there a way to get access to the current_user from within the navigation files?

andi commented

navigation files are evaluated in the view context, i.e. you have access to all helpers that you can use in your views. There is no reason why current_user would not be available in the navigation config files...

Got it working my mistake.
Thank you andi.
Great gem