geothird_friendly_id 4.0.9.2 → 4.0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/friendly_id.rb +1 -1
- data/lib/friendly_id/slug_generator.rb +2 -2
- 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: e8525835913c321adb72c5c749f1f0d5d46231a0
|
4
|
+
data.tar.gz: 46acec1b6840cf1dd6874020a9e4d666a38b0e95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce93b26fcfac3b7f7511aaced9e5925c52341528cad17fb4192b582e16118e7a8735690d17718001f6b703546a8110f81a173732ec7edbda7ba7b0fb7b964c74
|
7
|
+
data.tar.gz: 7b0dac21cdc66f1a70116c97216fa6dd98ca1360f94f3920a95fce20f579bebd9a70dd48d320fab1995c47232815226df1e7c8ae2a46d34df5b494951e3e86cb
|
data/lib/friendly_id.rb
CHANGED
@@ -57,8 +57,8 @@ module FriendlyId
|
|
57
57
|
base = "#{column} = ? OR #{column} LIKE ?"
|
58
58
|
# Awful hack for SQLite3, which does not pick up '\' as the escape character without this.
|
59
59
|
base << "ESCAPE '\\'" if sluggable.connection.adapter_name =~ /sqlite/i
|
60
|
-
scope = sluggable_class.unscoped.where(base, normalized, wildcard)
|
61
|
-
scope = scope.
|
60
|
+
scope = sluggable_class.unscoped.with_deleted.where(base, normalized, wildcard)
|
61
|
+
scope = scope.where("#{pkey} <> ?", value) unless sluggable.new_record?
|
62
62
|
scope = scope.order("LENGTH(#{column}) DESC, #{column} DESC")
|
63
63
|
end
|
64
64
|
|