vanity_slug 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d47176486a92662a7b2ba26cb421902ee7835c2e
4
- data.tar.gz: c0cc87e0d6c97e464b9c029ce46dcdd73c41a661
3
+ metadata.gz: ff429e2d72431d0416105975a5d5bf96eb159e96
4
+ data.tar.gz: dc6726780c59b1155b732c78ba441037adef5742
5
5
  SHA512:
6
- metadata.gz: f760ada2b91ae7639922cbcd19bcd2a68afeafc7e5a9c9fb490193b01f2e46b2ecf98b854d6d651a5baf047b3a76051f83356367be49e69985a04e794d883914
7
- data.tar.gz: 1c346ca98738d438e323e74401b0a83cc578fc62dd46e12b1e5629fe4aba76d98e78abf24b660045cd96fe599028910dd68713b474501ee6561110fcc50b48f5
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
- begin
126
- return true if Rails.application.routes.recognize_path(path) || Rails.application.routes.recognize_path(path, method: :post)
127
- rescue ActionController::RoutingError
128
- false
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
 
@@ -1,3 +1,3 @@
1
1
  module VanitySlug
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanity_slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Merwin