sluggable-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sluggable/rails/slug.rb +1 -1
- data/lib/sluggable/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10da458cda94abd21d65c946bf19d564a377fc996d649d37632e0155923e66fa
|
4
|
+
data.tar.gz: 2fc77bf0781eb764734f71efcb9e3e415ad2df644a26e3b7c19c56201e7e62b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbbd300753dfcc995509e1d0f7cbf7d47433eb1459738ababe7755c90576b6ec88ba908fb911dd8d7bb07eaf3d7abbd0471601d19a502771c1033576e6a7cbfd
|
7
|
+
data.tar.gz: be35e7d764ee42d6f777e2c1934941f9a86b9989f708c8f56f5aaca53dc9445e6e2c802bdccb4668ee2aeb7747196bc932bb984a8c965b59d65aae49d80ef183
|
data/lib/sluggable/rails/slug.rb
CHANGED
@@ -68,7 +68,7 @@ class Sluggable::Rails::Slug < String
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def unique?
|
71
|
-
found = record.class.find_by
|
71
|
+
found = record.class.find_by({ definition.attribute => self.to_s }.merge(scope))
|
72
72
|
!found || found.id == record.id
|
73
73
|
end
|
74
74
|
end
|