質問

I am using devise and faye. and I want to track all online users. so i thought of including a faye extension. in faye/faye_current_user.rb . when i am using current_user.id in faye_current_user.rb it is throwing undefined variable error.

If you have anyother easy way to fetch online users please help me out.

役に立ちましたか?

解決

The problem is that the "current_user" method from devise isn't being called before your method inside of faye_current_user.rb.

A working solution is dependent upon the where this file is located and how your set current_user before calling the methods within that file.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top