lib/generators/auth_strategist/templates/initializer.rb in auth_strategist-0.6.0 vs lib/generators/auth_strategist/templates/initializer.rb in auth_strategist-0.7.0

- old
+ new

@@ -1,13 +1,14 @@ -AuthStrategist.configure do |c| - # Set default strategy components - c.default_strategy_components = [] +# frozen_string_literal: true - # Set strategies directory path if they are not autoloaded +AuthStrategist.configure do |c| + # Set strategies directory path and load if they are not autoloaded # c.strategies_path = 'lib/auth_strategist/strategies' + # c.load_strategies! +end - # Register your strategies - # c.strategies do |s| - # # Example strategy - will be available under :password key - # s.password = PasswordStrategy - # end +# Register your strategies +AuthStrategist.strategies do |s| + # E.g. + # s.register :ownership, OwnershipAuthStrategy + # s.register 'ownership.book', BookOwnershipAuthStrategy end