Class: FormsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- FormsController
- Defined in:
- app/controllers/forms_controller.rb
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/forms_controller.rb', line 7 def new @response = find_or_create_response @response.update_attribute(:result, nil) redirect_to :back rescue redirect_to '/' end |
#update ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/forms_controller.rb', line 14 def update set_page set_form set_response set_configuration execute_extensions begin @response.save! redirect_to @form.redirect_to.present? ? @form.redirect_to : @page.url rescue "Form '#{@form.title}' could not be submitted." end end |