Class: Breeze::FormController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/breeze/form_controller.rb

Instance Method Summary collapse

Instance Method Details

#postObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/breeze/form_controller.rb', line 4

def post
  @section = Section.find( params[:section_id] )
  @errors = { }
  return if bot_alert
  check_maths
  verify_data
  if( @errors.length > 0)
    render "breeze/form/form"
  else
    dispatch_form_data( )
    redirect_to main_app.root_url , notice: @section.option("ok_message")
  end
end