safety_cone 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/safety_cone/filter.rb +5 -1
- data/lib/safety_cone/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102091580bdb530fd6392034da0e7a7d897b22e9
|
4
|
+
data.tar.gz: 0593e4bd7e20bf2e37146fa9d1c79dcbc0819420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b73a108b34e24183faf078e66e59af2ea078f4c67e6dba1930f3e6c20af03d25ffa3148b99ec3d0c2953ba0541d8d6d3e75c317a44aa07f7c0db63ed26119b4
|
7
|
+
data.tar.gz: 7136fba7edd7a9df1be88f8867f69c63d13e5f08e34376f7fb9ebc1e5b58d52ced8b0b6aa84d0be62e431ae6fa987e9390e069b693b5c60826822e34ba13ab65
|
data/lib/safety_cone/filter.rb
CHANGED
@@ -5,7 +5,11 @@ module SafetyCone
|
|
5
5
|
# Method to include to base class.
|
6
6
|
# This lets declare a before filter here
|
7
7
|
def self.included(base)
|
8
|
-
|
8
|
+
if Rails.version.to_i >= 5
|
9
|
+
base.before_action :safety_cone_filter
|
10
|
+
else
|
11
|
+
base.before_filter :safety_cone_filter
|
12
|
+
end
|
9
13
|
end
|
10
14
|
|
11
15
|
# Filter method that does the SafetyCone action
|
data/lib/safety_cone/version.rb
CHANGED