1. Do as follows in app/controllers/application_controller.rb:
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
def remote_ip
request.remote_ip
end
end
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
def remote_ip
request.remote_ip
end
end
Comments
Post a Comment