vanity_slug 0.0.5 → 0.0.6
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/vanity_slug/active_record.rb +4 -5
- data/lib/vanity_slug/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: ff429e2d72431d0416105975a5d5bf96eb159e96
|
4
|
+
data.tar.gz: dc6726780c59b1155b732c78ba441037adef5742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4996f46fd0a8fd83838047da80148ea4aab8cbc3f66c26a5aacc5f190393bdc54fad029d850ab2d7c629bae6859cd01bce65afa1791d5263e84d912beaaaa63d
|
7
|
+
data.tar.gz: 378f03922ff90e99c80e3a746e45f0d03cec65fe794e1303448a66528f79893eb72f9114cf352fb9bb7364c8dc5afe7e742514f72083746e81293119c5e07782
|
@@ -122,11 +122,10 @@ ActiveSupport.on_load :active_record do
|
|
122
122
|
|
123
123
|
def check_route_collision(path)
|
124
124
|
if defined?(Rails)
|
125
|
-
|
126
|
-
|
127
|
-
rescue
|
128
|
-
|
129
|
-
end
|
125
|
+
found = true
|
126
|
+
found = !!Rails.application.routes.recognize_path(path) rescue false
|
127
|
+
found = !!Rails.application.routes.recognize_path(path, method: :post) rescue false
|
128
|
+
found
|
130
129
|
end
|
131
130
|
end
|
132
131
|
|
data/lib/vanity_slug/version.rb
CHANGED