I have a method like this :
class ProfilesController < ApplicationController
before_filter :authenticate_user!
current_user
def index
@users = User.all
end
...
end
and my route is
match 'profile', :controller => 'profiles', :action => 'index'
but when I access http://127.0.0.1:8080/profile I get:
NoMethodErrorinProfiles#indexundefined methodeachfornil:NilClass
Worked. I just removed the line
current_userfrom myProfilesController@Jesper do this have something with the filter you said?