I've got Rails (4.0) running Devise gem (3.1.0) using model `User`. I have controller named `CollectionsController` and I want to get current logged in user object with Devise's accessor method `current_user` in this controller.

And after that it returns `undefined local variable or method 'current_user' for CollectionsController:Class`. The most interesting thing is that when I'm trying to do the same in another controller, for example `PagesController` — everything works perfectly!  

**UPD:** sharing the "code" of my controller :)  

```
class CollectionsController < ActionController::Base
    def index
         @user = current_user
    end
end

```

the source of `current_user` method is defined by Devise, not me. So I don't think that is the problem.