Sha256: 2014f7c354955a063188c5d36206f1e2f0c87fdb43a82dc8840eb1a4b41cd93c
Contents?: true
Size: 745 Bytes
Versions: 13
Compression:
Stored size: 745 Bytes
Contents
# frozen_string_literal: true module Rodauth module OAuth module ControllerMethods def self.included(controller) # ActionController::API doesn't have helper methods controller.helper_method :current_oauth_account, :current_oauth_application if controller.respond_to?(:helper_method) end def current_oauth_account(name = nil) rodauth(name).current_oauth_account end def current_oauth_application(name = nil) rodauth(name).current_oauth_application end end class Railtie < ::Rails::Railtie initializer "rodauth.controller" do ActiveSupport.on_load(:action_controller) do include ControllerMethods end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems