From 8e6b735299a2b81a0a9a5878f99701e0c2bdffc3 Mon Sep 17 00:00:00 2001 From: Sojan Date: Thu, 9 Jan 2020 11:59:31 +0530 Subject: [PATCH] Bugfix: Sidekiq queues getting stuck [#411] ref: https://github.com/rails/rails/issues/36810 closes: #411 --- .rubocop.yml | 2 ++ app/controllers/api/v1/widget/messages_controller.rb | 1 + config/application.rb | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 248a11eed..8fa1dd4a5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,8 @@ Rails/ApplicationController: - 'app/controllers/widgets_controller.rb' Style/ClassAndModuleChildren: EnforcedStyle: compact + Exclude: + - 'config/application.rb' RSpec/NestedGroups: Enabled: true Max: 4 diff --git a/app/controllers/api/v1/widget/messages_controller.rb b/app/controllers/api/v1/widget/messages_controller.rb index ae6ae7902..a3e83663e 100644 --- a/app/controllers/api/v1/widget/messages_controller.rb +++ b/app/controllers/api/v1/widget/messages_controller.rb @@ -1,4 +1,5 @@ class Api::V1::Widget::MessagesController < ActionController::Base + skip_before_action :verify_authenticity_token before_action :set_conversation, only: [:create] def index diff --git a/config/application.rb b/config/application.rb index 42aa66eb3..c13d1db41 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,7 +11,7 @@ Bundler.require(*Rails.groups) module Chatwoot class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.0 + config.load_defaults 6.0 config.autoload_paths << Rails.root.join('lib') config.eager_load_paths << Rails.root.join('lib')