Sha256: 7652306a8e2e4b75744739073a20cf4cec9afbfee257b1e8267f681f425d1989
Contents?: true
Size: 556 Bytes
Versions: 1
Compression:
Stored size: 556 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
panda_cms-0.3.13 | app/controllers/panda_cms/form_submissions_controller.rb |