Sha256: 6e0071094dcf07b8b55a18f37fb921f5d4a3125b5abaf34343d923c7915c5742

Contents?: true

Size: 556 Bytes

Versions: 25

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

module ActionPolicy
  module ScopeMatchers
    # Adds `params_filter` method as an alias
    # for `scope_for :action_controller_params`
    module ActionControllerParams
      def params_filter(*args, &block)
        scope_for :action_controller_params, *args, &block
      end
    end
  end
end

# Register params scope matcher
ActionPolicy::Base.scope_matcher :action_controller_params, ActionController::Parameters

# Add alias to base policy
ActionPolicy::Base.extend ActionPolicy::ScopeMatchers::ActionControllerParams

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
action_policy-0.6.5 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.6.4 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.6.3 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.6.2 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.6.1 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.6.0 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.7 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.6 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.5 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.4 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.3 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.2 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.1 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.5.0 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.4.4 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.4.3 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.4.2 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.4.1 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.4.0 lib/action_policy/rails/scope_matchers/action_controller_params.rb
action_policy-0.3.4 lib/action_policy/rails/scope_matchers/action_controller_params.rb