Rails app with Restforce gem: undefined local variable or method `current_user'

76 Views Asked by At

I followed the instructions http://geekymartian.com/articles/ruby-on-rails-4-salesforce-oauth-implementation/
When I run rake db:migrate I get the following error:

NameError: undefined local variable or method 'current_user' for TomtomCusu::Application:Class

The method is defined in the application_controller.rg

class ApplicationController < ActionController::Base
 # Prevent CSRF attacks by raising an exception.
 # For APIs, you may want to use :null_session instead.
 protect_from_forgery with: :exception

 private

  def current_user
   @current_user ||= User.find(session[:user_id]) if session[:user_id]
  end

  helper_method :current_user

end
0

There are 0 best solutions below