Class: Para::Stall::Inputs::VariantsMatrixInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- Para::Stall::Inputs::VariantsMatrixInput
- Includes:
- VariantInputHelper
- Defined in:
- lib/para/stall/inputs/variants_matrix_input.rb
Instance Method Summary collapse
-
#initialize ⇒ VariantsMatrixInput
constructor
A new instance of VariantsMatrixInput.
- #input(wrapper_options = nil) ⇒ Object
Constructor Details
#initialize ⇒ VariantsMatrixInput
Returns a new instance of VariantsMatrixInput.
7 8 9 10 |
# File 'lib/para/stall/inputs/variants_matrix_input.rb', line 7 def initialize(*) super [:label] = false end |
Instance Method Details
#input(wrapper_options = nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/para/stall/inputs/variants_matrix_input.rb', line 12 def input( = nil) ensure_target_relation_present! ensure_empty_variant_if_needed template.render partial: 'para/stall/inputs/variants_matrix', locals: { form: @builder, model: model, attribute_name: attribute_name, all_properties: all_properties, properties: properties, variants: variants, dom_identifier: dom_identifier, variant_row_locals: variant_row_locals, allow_empty_variant: allow_empty_variant } end |