Accessing devise current_user inside another rails engine -


so here issue. have main application has devise in it,for creating engine. in engine need current_user main app. not sure how that, tried this link no avail. great. if not recommended please explain why.

solved it

in engine can access main app using 'main_app'. in variable have access current user, assuming have devise. in order access devise current_user have is

main_app.scope.env['warden'].user 

devise stores user inside warden key in session. since uses warden internally authenticate , store details in session.

if there alternative solution please let me know.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -