Sha256: cc54e1ccc1e80ecba9734541e4565eb8f3b750ebb7d4ad6437832fb9fee0b04d
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
module Fae class FormManagersController < ApplicationController def update if params[:form_manager].present? fields_serialized = params[:form_manager][:fields].to_json conditions = { form_manager_model_name: params[:form_manager][:form_manager_model_name], } if params[:form_manager][:form_manager_model_name] == 'Fae::StaticPage' conditions[:form_manager_model_id] = params[:form_manager][:form_manager_model_id] end FormManager.where(conditions).first_or_initialize.update_attribute(:fields, fields_serialized) end render body: nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fae-rails-3.0.0 | app/controllers/fae/form_managers_controller.rb |
fae-rails-2.2.0 | app/controllers/fae/form_managers_controller.rb |