Use argument form of with_options

Without the arg, this seems to work only in some versions of rails
This commit is contained in:
Ben Lavender 2017-05-17 11:38:57 -05:00
Родитель 3559cee527
Коммит 165df0fb6d
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -6,12 +6,12 @@ module Chatops
extend ActiveSupport::Concern
included do
with_options if: :should_authenticate_chatops? do
before_action :ensure_valid_chatops_url
before_action :ensure_valid_chatops_timestamp
before_action :ensure_valid_chatops_signature
before_action :ensure_valid_chatops_nonce
before_action :ensure_chatops_authenticated
with_options if: :should_authenticate_chatops? do |controller|
controller.before_action :ensure_valid_chatops_url
controller.before_action :ensure_valid_chatops_timestamp
controller.before_action :ensure_valid_chatops_signature
controller.before_action :ensure_valid_chatops_nonce
controller.before_action :ensure_chatops_authenticated
end
before_action :ensure_user_given
before_action :ensure_method_exists