module ActiveInteraction::Extras::FilterExtensions::HashAutoStrip

If hash specified without structure automatically accept full hash

@example Accept all keys

hash :options

@example Accept only specified keys

hash :options do
  string :name
end

@example Accept all keys

hash :options, strip: false do
  string :name
end

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/active_interaction/extras/filter_extensions/hash_auto_strip.rb, line 19
def initialize(*)
  super
  options[:strip] = false if !block_given? && !options.key?(:strip)
end