From 0a07042797c6588da594f202f7adc763678298b3 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sat, 21 Jan 2023 22:47:59 +0200 Subject: [PATCH] fix form stuff --- Gemfile.lock | 4 ++-- config/initializers/lib.rb | 1 + config/routes.rb | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 config/initializers/lib.rb diff --git a/Gemfile.lock b/Gemfile.lock index 0755bfd..7ed70e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/HubFeenixMakers/merged - revision: 05ee69ce24b7c5a593b8c57c87a3e1f8e50f3b32 + revision: accb6682675f92eed6e1c306995017b1c8da1289 specs: merged (0.1.0) active_hash @@ -294,7 +294,7 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.4) + rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) rails_gravatar (1.0.4) actionview 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 2cf0176..a2be4e2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,8 +10,9 @@ Rails.application.routes.draw do mount Thredded::Engine => '/forum' - mount Merged::Engine => "/merged" + 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