11

RubyMine7.0.1 shows this alert in every controller class.
A controller class file below. Thanks.

application_controller.rb

class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception
  helper_method :current_user, :logged_in?
  before_action :authenticate

  private
  def current_user
    return unless sessions[:user_id]
    @current_user ||= User.find(session[:user_id])
  end

  def logged_in?
    !!session[:user_id]
  end

  def authenticate
    return if logged_in?
    redirect_to root_path, alert: 'ログインして下さい。'
  end
end
2
  • Could you please show the complete declaration of the class?
    – yole
    Commented Dec 19, 2014 at 23:41
  • 1
    Thanks! I added a controller class. Every class show this alert.
    – ksh
    Commented Dec 20, 2014 at 0:35

1 Answer 1

0

I got the very same error when I imported a project from existing sources and the Project SDK was not set properly for the project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.