lib/warden/config.rb
# A short hand way to set up a particular scope
# :api: public
A short hand way to set up a particular scope
:api: public
A short hand way to set up a particular scope : api : public
def scope_defaults(scope, opts = {})
      if strategies = opts.delete(:strategies)
        default_strategies(strategies, :scope => scope)
      end
      if opts.empty?
        self[:scope_defaults][scope] || {}
      else
        self[:scope_defaults][scope] ||= {}
        self[:scope_defaults][scope].merge!(opts)
      end
    end
def scope_defaults ( scope , opts = { } ) if strategies = opts . delete ( :strategies ) default_strategies ( strategies , :scope => scope ) end if opts . empty? self [ :scope_defaults ] [ scope ] || { } else self [ :scope_defaults ] [ scope ] ||= { } self [ :scope_defaults ] [ scope ] . merge! ( opts ) end end
A short hand way to set up a particular scope
:api: public
A short hand way to set up a particular scope : api : public
scope
<not_specific>
opts
<not_specific>