Sha256: 8bb43fc431616bb9e95555691f806425beaa58b52dd6637e15580f1476ab5cf2

Contents?: true

Size: 252 Bytes

Versions: 12

Compression:

Stored size: 252 Bytes

Contents

# frozen_string_literal: true

module CanCan
  module ParameterValidators
    def valid_attribute_param?(attribute)
      attribute.nil? || attribute.is_a?(Symbol) || (attribute.is_a?(Array) && attribute.all? { |a| a.is_a?(Symbol) })
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/cancancan-3.6.1/lib/cancan/parameter_validators.rb
cancancan-3.5.0 lib/cancan/parameter_validators.rb
cancancan-3.4.0 lib/cancan/parameter_validators.rb
cancancan-3.3.0 lib/cancan/parameter_validators.rb
cancancan-3.2.2 lib/cancan/parameter_validators.rb
cancancan-3.2.1 lib/cancan/parameter_validators.rb
cancancan-3.2.0 lib/cancan/parameter_validators.rb
cancancan-3.1.0 lib/cancan/parameter_validators.rb
cancancan-3.0.2 lib/cancan/parameter_validators.rb
cancancan-3.0.1 lib/cancan/parameter_validators.rb
cancancan-3.0.0 lib/cancan/parameter_validators.rb
cancancan-3.0.0.rc1 lib/cancan/parameter_validators.rb