Sha256: cc6a03413acec1e5bf5379707914c9b484774ac39e9afb1c13afa99af4cb03dc
Contents?: true
Size: 778 Bytes
Versions: 22
Compression:
Stored size: 778 Bytes
Contents
module Plutonium module Auth module Rodauth def self.for(name) mod = Module.new mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1 extend ActiveSupport::Concern included do helper_method :current_user helper_method :logout_url end private def rodauth(name = :#{name}) super(name) end def current_user rodauth.rails_account end def logout_url rodauth.logout_path end define_singleton_method(:to_s) { "Plutonium::Auth::Rodauth(:#{name})" } define_singleton_method(:inspect) { "Plutonium::Auth::Rodautht(:#{name})" } RUBY mod end end end end
Version data entries
22 entries across 22 versions & 1 rubygems