geothird_friendly_id 4.0.9.7 → 4.0.9.8

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: 590b9ee0101b51a41c1a8676891e5245a0bdbb55
4
- data.tar.gz: a4234e8d235f8f87877112182f53aa857d6013ac
3
+ metadata.gz: a9af828fb58fbdd77b333c711b690dc89a93ce30
4
+ data.tar.gz: 5695d4a6c99397fa88afd21bb222a967a7c07b04
5
5
  SHA512:
6
- metadata.gz: ffbfe3662868b6acd468088e217e0491fee518c99127d05c044c7f8c3e9c979c95b0134a269ff9cf8e1728182f5484037162ae7f40aae04c849e65d5d974c01c
7
- data.tar.gz: 77771114f5d921d999f6d5363910f6c5cf7a0a6cf9c9fa6077258d7a66fdea21d2f655dd274857edf5a929210bf6a8f17f73be4982f07ee36d7d03b7bacc8725
6
+ metadata.gz: 99d6d7544fe2d00a2a4394e1793b3329613d6994250218d76eedbec45a6931e55db61465ee07b9cce20eacde3e2e392c152cfab5c4fc809f3540aa1f97b185ec
7
+ data.tar.gz: f1273b40fa402e9be540e0b5499ecad1d258973c2db3d3c1d783a2a6984d16ac54236f953a9b42ddc8c8c7d6e3b0bdf3ffa7ab0d126d09c02deadcda86e09a18
@@ -45,7 +45,7 @@ with numeric ids:
45
45
  module FriendlyId
46
46
 
47
47
  # The current version.
48
- VERSION = "4.0.9.7"
48
+ VERSION = "4.0.9.8"
49
49
 
50
50
  @mutex = Mutex.new
51
51
 
@@ -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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geothird_friendly_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.9.7
4
+ version: 4.0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke