From 56a3eef324f090ec3223801639b24b4da898788e Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Thu, 25 May 2017 12:20:11 +0200 Subject: [PATCH] More secure route for settings --- .rubocop.yml | 3 +++ config/routes.rb | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index fc3cb7f..d4c6742 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,9 @@ Rails: Enabled: true +Rails/ApplicationRecord: + Enabled: false + AllCops: TargetRubyVersion: 2.1 diff --git a/config/routes.rb b/config/routes.rb index 2bfcecb..820f221 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,7 @@ # Redmine Messenger plugin for Redmine RedmineApp::Application.routes.draw do - match 'projects/:id/messenger_settings/:action', controller: 'messenger_settings', via: %i[get post put patch] + match 'projects/:id/messenger_settings/save', + to: 'messenger_settings#save', + via: %i[post put patch] end