module SimpleTokenAuthentication::Configuration
Public Instance Methods
configure() { |self| ... }
click to toggle source
Allow the default configuration to be overwritten from initializers
# File lib/simple_token_authentication/configuration.rb, line 28 def configure yield self if block_given? end
parse_options(options)
click to toggle source
# File lib/simple_token_authentication/configuration.rb, line 32 def parse_options(options) unless options[:fallback].presence if options[:fallback_to_devise] options[:fallback] = :devise elsif options[:fallback_to_devise] == false if SimpleTokenAuthentication.fallback == :devise options[:fallback] = :none else options[:fallback] = SimpleTokenAuthentication.fallback end else options[:fallback] = SimpleTokenAuthentication.fallback end end options.reject! { |k,v| k == :fallback_to_devise } options end