geothird_friendly_id 4.0.9.3 → 4.0.9.4
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/finder_methods.rb +1 -1
- data/lib/friendly_id/scoped.rb +1 -1
- data/lib/friendly_id/slug_generator.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: e8156570acc66ffd77342d64504f59435d8e0c3d
|
4
|
+
data.tar.gz: 12d5abb500f2004dc4a5ae2864e1c2ed6a9ab1bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eed9ae32ec35718f79139a1a77713f193023cba771f4edc090e4550715dbc5a73985927a935d70aa723e926f8c59b9871412e717dc613a0a63aaca4caf22559
|
7
|
+
data.tar.gz: 888c7942bb557ebdd1cfaf7a97ec3239b577e5b67ff24732325b6a4a002b31bacc3efe6908da19289a98453598eab23678355f8ca1b930644e377f1cea6903db
|
data/lib/friendly_id.rb
CHANGED
@@ -14,7 +14,7 @@ module FriendlyId
|
|
14
14
|
# @see FriendlyId::ObjectUtils
|
15
15
|
def find_one(id)
|
16
16
|
return super if id.unfriendly_id?
|
17
|
-
where(@klass.friendly_id_config.query_field => id).first or super
|
17
|
+
with_deleted.where(@klass.friendly_id_config.query_field => id).first or super
|
18
18
|
end
|
19
19
|
|
20
20
|
# FriendlyId overrides this method to make it possible to use friendly id's
|
data/lib/friendly_id/scoped.rb
CHANGED
@@ -139,7 +139,7 @@ an example of one way to set this up:
|
|
139
139
|
def conflict
|
140
140
|
columns = friendly_id_config.scope_columns
|
141
141
|
matched = columns.inject(conflicts) do |memo, column|
|
142
|
-
memo.where(column => sluggable.send(column))
|
142
|
+
memo.with_deleted.where(column => sluggable.send(column))
|
143
143
|
end
|
144
144
|
|
145
145
|
matched.first
|
@@ -58,7 +58,7 @@ module FriendlyId
|
|
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
60
|
scope = sluggable_class.unscoped.with_deleted.where(base, normalized, wildcard)
|
61
|
-
scope = scope.where("#{pkey} <> ?", value) unless sluggable.new_record?
|
61
|
+
scope = scope.with_deleted.where("#{pkey} <> ?", value) unless sluggable.new_record?
|
62
62
|
scope = scope.order("LENGTH(#{column}) DESC, #{column} DESC")
|
63
63
|
end
|
64
64
|
|