lib/troles/common/macros.rb in troles-0.5.0 vs lib/troles/common/macros.rb in troles-0.5.1
- old
+ new
@@ -7,25 +7,25 @@
# Usage:
# class User
# troles_strategy :bit_many
#
-puts "Troles macros enabled!"
-
module Troles
module Macros
autoload :Configuration, 'troles/common/macros/configuration'
def troles_strategy strategy, options = {}, &block
configuration = Configuration.new self, strategy, options
configuration.load_adapter
- # puts "strategy module: #{configuration.strategy_module}"
+ puts "strategy module: #{configuration.strategy_module}"
+ puts configuration.strategy_module.methods.grep /store/
+
send :include, configuration.strategy_module
configuration.define_hooks
configuration.apply_strategy_options!
-
+
if strategy == :bit_one
troles_config.valid_roles = [:user, :admin] # default binary roles
end
yield troles_config if block_given?