Если вы используете "restful_authentication", попробуйте добавить include AuthenticatedSystem
, как показано ниже
#app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
include AuthenticatedSystem
.....
logged_in?
- это защищенный метод внутри модуля AuthenticatedSystem
module AuthenticatedSystem
protected
# Returns true or false if the <%= file_name %> is logged in.
# Preloads @current_<%= file_name %> with the <%= file_name %> model if they're logged in.
def logged_in?
!!current_<%= file_name %>
end
......
НТН