Module: FormAngular::Fields::NgModelInput
- Extended by:
- ActiveSupport::Concern
- Includes:
- NgOptionUtils
- Defined in:
- lib/form_angular/fields/ng_model.rb
Instance Method Summary collapse
- #initialize_with_ng_model(builder, attribute_name, column, input_type, options = {}) ⇒ Object
- #is_ng_form? ⇒ Boolean
Instance Method Details
#initialize_with_ng_model(builder, attribute_name, column, input_type, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/form_angular/fields/ng_model.rb', line 11 def initialize_with_ng_model(builder, attribute_name, column, input_type, = {}) initialize_without_ng_model(builder, attribute_name, column, input_type, ) .merge! (attribute_name, @builder) if is_ng_form? end |
#is_ng_form? ⇒ Boolean
16 17 18 19 20 21 22 23 24 |
# File 'lib/form_angular/fields/ng_model.rb', line 16 def is_ng_form? return @builder.[:ngform] if @builder.[:ngform].present? parent_builder = @builder.[:parent_builder] #Find a parent builder with ngform until !parent_builder || parent_builder.[:ngform].present? parent_builder = parent_builder.[:parent_builder] end return parent_builder && parent_builder.[:ngform] end |