Class: FreeQuoteForm

Inherits:
ApplicationForm show all
Extended by:
EnumField::EnumeratedAttribute
Defined in:
app/forms/free_quote_form.rb

Instance Attribute Summary

Attributes inherited from ApplicationForm

#raw_responce

Instance Method Summary collapse

Methods inherited from ApplicationForm

#persisted?

Instance Method Details

#submitObject



42
43
44
45
46
47
48
49
50
51
# File 'app/forms/free_quote_form.rb', line 42

def submit
  if valid?
    return false if customer_mode.nil?

    api_answer = TranslationCms::Api::FreeQuote.create(params)
    merge_responce! api_answer
  end

  errors.empty?
end