geothird_friendly_id 4.0.9.7 → 4.0.9.8
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/friendly_id.rb +1 -1
- data/lib/friendly_id/base.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: a9af828fb58fbdd77b333c711b690dc89a93ce30
|
4
|
+
data.tar.gz: 5695d4a6c99397fa88afd21bb222a967a7c07b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99d6d7544fe2d00a2a4394e1793b3329613d6994250218d76eedbec45a6931e55db61465ee07b9cce20eacde3e2e392c152cfab5c4fc809f3540aa1f97b185ec
|
7
|
+
data.tar.gz: f1273b40fa402e9be540e0b5499ecad1d258973c2db3d3c1d783a2a6984d16ac54236f953a9b42ddc8c8c7d6e3b0bdf3ffa7ab0d126d09c02deadcda86e09a18
|
data/lib/friendly_id.rb
CHANGED
data/lib/friendly_id/base.rb
CHANGED
@@ -221,7 +221,7 @@ often better and easier to use {FriendlyId::Slugged slugs}.
|
|
221
221
|
relation = relation_class.new(self, arel_table)
|
222
222
|
|
223
223
|
if finder_needs_type_condition?
|
224
|
-
relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name)
|
224
|
+
relation.with_deleted.where(type_condition).create_with(inheritance_column.to_sym => sti_name)
|
225
225
|
else
|
226
226
|
relation
|
227
227
|
end
|
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
|
@@ -57,7 +57,7 @@ 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)
|
60
|
+
scope = sluggable_class.unscoped.with_deleted.where(base, normalized, wildcard)
|
61
61
|
scope = scope.where("#{pkey} <> ?", value) unless sluggable.new_record?
|
62
62
|
scope = scope.order("LENGTH(#{column}) DESC, #{column} DESC")
|
63
63
|
end
|