I am trying to integrate oAuth2.0 in my rails-api application using a gatekeeper. But I keep getting this error, the undefined method is `helper_method for ApplicationController" and still could not find a clear solution on how to solve it. Below is the class application_controller.rb that has helper_method. I follow the guide on the link below. Any help would be appreciated.
https://www.sitepoint.com/getting-started-with-doorkeeper-and-oauth-2-0/
class ApplicationController < ActionController::API private def current_user @current_user ||= User.find(session[:user_id]) if session[:user_id] end helper_method :current_user end
; . Helpers, "rails-api",
class ApplicationController < ActionController::API include ActionController::Helpers end
API- , helper_method . current_user , ActionController:: Base.
helper_method
current_user
ActionController Github. , AbstractController:: Helpers .
Rails 4, , ActionController:: Helpers. APIDock.
:
#application_controller.rb class ApplicationController < ActionController::Base
Source: https://habr.com/ru/post/1652637/More articles:How to return from a recursive generator function in JavaScript? - javascriptJS builds an object recursively - javascriptUbuntu, Apache2, Django) Fatal Python error: Py_Initialize: cannot get locale encoding ImportError: no module named 'encodings' - pythonHow to change COLOR bounding boxes on a table view - javaDelete grid in tableView - cssOverride Function - iosHow to set up wire transfer with Django Allauth - djangothree level nested url in angular - javascriptHow does email translation work with django allauth? - djangotext syntax for domain models - groovyAll Articles