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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8525835913c321adb72c5c749f1f0d5d46231a0
4
- data.tar.gz: 46acec1b6840cf1dd6874020a9e4d666a38b0e95
3
+ metadata.gz: e8156570acc66ffd77342d64504f59435d8e0c3d
4
+ data.tar.gz: 12d5abb500f2004dc4a5ae2864e1c2ed6a9ab1bf
5
5
  SHA512:
6
- metadata.gz: ce93b26fcfac3b7f7511aaced9e5925c52341528cad17fb4192b582e16118e7a8735690d17718001f6b703546a8110f81a173732ec7edbda7ba7b0fb7b964c74
7
- data.tar.gz: 7b0dac21cdc66f1a70116c97216fa6dd98ca1360f94f3920a95fce20f579bebd9a70dd48d320fab1995c47232815226df1e7c8ae2a46d34df5b494951e3e86cb
6
+ metadata.gz: 5eed9ae32ec35718f79139a1a77713f193023cba771f4edc090e4550715dbc5a73985927a935d70aa723e926f8c59b9871412e717dc613a0a63aaca4caf22559
7
+ data.tar.gz: 888c7942bb557ebdd1cfaf7a97ec3239b577e5b67ff24732325b6a4a002b31bacc3efe6908da19289a98453598eab23678355f8ca1b930644e377f1cea6903db
data/lib/friendly_id.rb CHANGED
@@ -45,7 +45,7 @@ with numeric ids:
45
45
  module FriendlyId
46
46
 
47
47
  # The current version.
48
- VERSION = "4.0.9.3"
48
+ VERSION = "4.0.9.4"
49
49
 
50
50
  @mutex = Mutex.new
51
51
 
@@ -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
@@ -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
 
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.3
4
+ version: 4.0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke