Class: ParsleySimpleForm::Constraints::Basics::MincheckConstraint
- Inherits:
-
ParsleySimpleForm::Constraints::BaseConstraint
- Object
- ParsleySimpleForm::Constraints::BaseConstraint
- ParsleySimpleForm::Constraints::Basics::MincheckConstraint
- Defined in:
- lib/parsley_simple_form/constraints/basics/mincheck_constraint.rb
Instance Method Summary collapse
Methods inherited from ParsleySimpleForm::Constraints::BaseConstraint
#initialize, #input_id, #input_type
Constructor Details
This class inherits a constructor from ParsleySimpleForm::Constraints::BaseConstraint
Instance Method Details
#html_attributes ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/parsley_simple_form/constraints/basics/mincheck_constraint.rb', line 11 def html_attributes attributes = { :'data-parsley-mincheck' => @options[:mincheck], :'data-parsley-mincheck-message' => I18n::translate('form_validation.message.mincheck', mincheck: @options[:mincheck]) } attributes.merge!({:'data-parsley-group' => @options[:check_group]}) unless @options[:check_group].nil? attributes end |
#match? ⇒ Boolean
6 7 8 9 |
# File 'lib/parsley_simple_form/constraints/basics/mincheck_constraint.rb', line 6 def match? return false if @options.nil? !@options[:mincheck].nil? end |