Sha256: e71223bc2ff651b3b523b17e26bdbe82dd8392f2e7a039aa07caf67fead7c00c
Contents?: true
Size: 555 Bytes
Versions: 5
Compression:
Stored size: 555 Bytes
Contents
module PandaCms class FormSubmissionsController < ApplicationController def create vars = params.except(:authenticity_token, :controller, :action, :id) PandaCms::FormSubmission.create!(form_id: params[:id], data: vars.to_unsafe_h) if (completion_path = PandaCms::Form.find(params[:id]).completion_path) redirect_to completion_path else # TODO: This isn't a great fallback, we should do something nice here... # Perhaps a simple JS alert when sent? redirect_to "/" end end end end
Version data entries
5 entries across 5 versions & 1 rubygems