lib/authority/configuration.rb in authority-0.9.0 vs lib/authority/configuration.rb in authority-1.0.0.pre2

- old
+ new

@@ -1,10 +1,12 @@ module Authority class Configuration - attr_accessor :default_strategy, :abilities, :authority_actions, :user_method, :logger + # Has default settings, overrideable in the initializer. + attr_accessor :default_strategy, :abilities, :controller_action_map, :user_method, :logger + def initialize @default_strategy = Proc.new { |able, authorizer, user| false } @@ -13,10 +15,10 @@ :read => 'readable', :update => 'updatable', :delete => 'deletable' } - @authority_actions = { + @controller_action_map = { :index => 'read', :show => 'read', :new => 'create', :create => 'create', :edit => 'update',