How get Devise's current_user method in Rails Engine

后端 未结 1 1732
-上瘾入骨i
-上瘾入骨i 2021-01-21 08:35

I have a Rails application that\'s using the Devise gem, and I\'m creating a Rails Engine to mount in this app.

mount Comments::Engine => \'/talk\', :as =>         


        
相关标签:
1条回答
  • 2021-01-21 09:06

    Seams I'm solved problem. I'd call current_user within Comments model and it didn't work. However getting current_user from controller, works fine. But this is not elegant way (.

    0 讨论(0)
提交回复
热议问题