cats_core 1.4.38 → 1.4.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/cats/core/application_controller.rb +9 -0
- data/app/controllers/cats/core/dispatches_controller.rb +1 -0
- data/app/controllers/cats/core/round_plans_controller.rb +1 -0
- data/app/controllers/cats/core/users_controller.rb +2 -0
- data/lib/cats/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a86860a6e6a86d7d133ab9a050bffdd675d00c1fad85e9af8b9fabf24183711d
|
4
|
+
data.tar.gz: 23001d95a8ce470d196ab560dd72d782f080ed8fed7e9067a12674b06084cf35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10324cc46243b87345e485e9f176cd1b4a9acc277d8c26aa5b1372c3dc211fa4e4a3f473e81ad94c1bcba0f67c8a9cbb988b5648f4bd70063ab10da0c4865636
|
7
|
+
data.tar.gz: 0c530f68241d07329f96a399b2fcac5cffc30bb549c5ddb605739a49db2150cbef97b24e290459232d05f4bf67390ecf66c706bc2f552628743853b4d7bec86b
|
@@ -14,6 +14,15 @@ module Cats
|
|
14
14
|
render json: { error: 'Unauthorized' }, status: 401 if current_user.nil?
|
15
15
|
end
|
16
16
|
|
17
|
+
# In case we want to disable bullet for specific controller actions
|
18
|
+
def skip_bullet
|
19
|
+
previous_value = Bullet.enable?
|
20
|
+
Bullet.enable = false
|
21
|
+
yield
|
22
|
+
ensure
|
23
|
+
Bullet.enable = previous_value
|
24
|
+
end
|
25
|
+
|
17
26
|
private
|
18
27
|
|
19
28
|
def serialize(data)
|
@@ -4,6 +4,7 @@ module Cats
|
|
4
4
|
include Common
|
5
5
|
skip_before_action :authenticate, only: %i[start_with_pin]
|
6
6
|
before_action :set_service, only: %i[create_receipt_authorization approve start start_with_pin search confirm]
|
7
|
+
around_action :skip_bullet, if: -> { defined?(Bullet) }, only: %i[search start_with_pin]
|
7
8
|
|
8
9
|
def index
|
9
10
|
super do
|
@@ -3,6 +3,8 @@ module Cats
|
|
3
3
|
class UsersController < ApplicationController
|
4
4
|
include Common
|
5
5
|
|
6
|
+
around_action :skip_bullet, if: -> { defined?(Bullet) }, only: %i[stores]
|
7
|
+
|
6
8
|
def index
|
7
9
|
super do
|
8
10
|
User.joins(:application_module).where(cats_core_application_modules: { prefix: params[:prefix] })
|
data/lib/cats/core/version.rb
CHANGED