Module: FormAngular::Forms::NgForm

Extended by:
ActiveSupport::Concern
Includes:
NgOptionUtils
Defined in:
lib/form_angular/forms/ng_form.rb

Instance Method Summary collapse

Instance Method Details

#simple_form_for_with_ng_model(record, options = {}, &block) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/form_angular/forms/ng_form.rb', line 11

def simple_form_for_with_ng_model(record, options = {}, &block)
  if options[:ngform]
    options[:html] ||= {}
    options[:html] = build_angular_form_options(record).merge! options[:html]
    options[:fields_context] = form_context(record)
  end

  simple_form_for_without_ng_model(record, options, &block)
end