Class: Account::FeedbackForm
- Inherits:
-
ApplicationForm
- Object
- ApplicationForm
- Account::FeedbackForm
- Defined in:
- app/forms/account/feedback_form.rb
Instance Attribute Summary
Attributes inherited from ApplicationForm
Instance Method Summary collapse
Methods inherited from ApplicationForm
Instance Method Details
#submit ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/forms/account/feedback_form.rb', line 17 def submit return false unless valid? api_answer = if id.blank? TranslationCms::Api::Customers::Feedback.create(attributes) else TranslationCms::Api::Customers::Feedback.update( attributes.reverse_merge(violation_content: 'bla-bla') ) end merge_responce! api_answer errors.empty? end |