Module: MtkFramework::ActiveInteractionParams

Defined in:
lib/mtk_framework/active_interaction_params.rb,
lib/mtk_framework/active_interaction_params/parametrize_filter.rb

Defined Under Namespace

Classes: ParametrizeFilter

Instance Method Summary collapse

Instance Method Details

#params_from_interaction(klass, only: []) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/mtk_framework/active_interaction_params.rb', line 7

def params_from_interaction(klass, only: [])
  params do
    klass.filters.slice(*only).each do |_, filter|
      ParametrizeFilter.call(filter, self)
      yield self if block_given?
    end
  end
end