From 080e02a1f3af4fef89173447f2b64a3b871c3de6 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sat, 21 Jan 2023 22:47:26 +0200 Subject: [PATCH] fixing merged form handling (without sending) --- Gemfile.lock | 21 ++++++++++----------- config/initializers/lib.rb | 1 + config/routes.rb | 1 + merged/sections.yml | 4 +++- 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 config/initializers/lib.rb diff --git a/Gemfile.lock b/Gemfile.lock index 462ae84..0e99cc6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,14 @@ GIT - remote: https://github.com/HubFeenixMakers/merged - revision: 05ee69ce24b7c5a593b8c57c87a3e1f8e50f3b32 + remote: https://github.com/ruby2js/ruby2js/ + revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d + branch: haml_fix + specs: + ruby2js (5.0.1) + parser + regexp_parser (~> 2.1.1) + +PATH + remote: ../merged specs: merged (0.1.0) active_hash @@ -11,15 +19,6 @@ GIT redcarpet ruby2js (~> 5.0, >= 5.0.1) -GIT - remote: https://github.com/ruby2js/ruby2js/ - revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d - branch: haml_fix - specs: - ruby2js (5.0.1) - parser - regexp_parser (~> 2.1.1) - GEM remote: https://rubygems.org/ specs: diff --git a/config/initializers/lib.rb b/config/initializers/lib.rb new file mode 100644 index 0000000..905dcc7 --- /dev/null +++ b/config/initializers/lib.rb @@ -0,0 +1 @@ +require "form_handler" diff --git a/config/routes.rb b/config/routes.rb index e1378aa..e9a5b3d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,6 +14,7 @@ Rails.application.routes.draw do mount Merged::Engine => "/merged" unless Rails.env.production? + post "/form" , to: "merged/form#post" , as: :post_form get "/news/:id" , to: "merged/view#page" , id: :id , as: :view_blog get ":id" , to: "merged/view#page" , id: :id , as: :view_page diff --git a/merged/sections.yml b/merged/sections.yml index 9f55794..370244e 100644 --- a/merged/sections.yml +++ b/merged/sections.yml @@ -718,10 +718,12 @@ background: white text_color: solid_blue ok_message: We'll get back to you - :updated_at: *4 + handler: FormHandler + :updated_at: 2023-01-21 22:39:50.207546161 +02:00 :page_id: 6 :index: 10 :image_id: + :updated_by: torsten@villataika.fi - :template: section_large_image :index: 4 :page_id: 5