ish_models 0.0.33.138 → 0.0.33.139
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gallery.rb +0 -1
- data/lib/ish/utils.rb +5 -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: ca15ab4eb3ebc3e6a6ea6766fa2b80281bcf89eefe3efd35ac7e531545147e6f
|
4
|
+
data.tar.gz: ccd4b15972edb2bd61320bd17e2b3443062130f532d460fe2fd6185722d649e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650afa1a9f2a769facc5361560dc94436793fca21992532348a48bcaf5c4fc627194221a4527700034613cedba247d2dcf9d490b2c3e0dbe54038b905efcee8a
|
7
|
+
data.tar.gz: 803f1bcbb5bad0ac64125fd3d370ff9da205f7ba231b29b276c67b2f8648d30be064f6cc29bf213300001f57993e94ca5a0eb3dace6e4e277c08490714c2c619
|
data/lib/gallery.rb
CHANGED
data/lib/ish/utils.rb
CHANGED
@@ -5,7 +5,11 @@ module Ish::Utils
|
|
5
5
|
|
6
6
|
def set_slug
|
7
7
|
return if slug
|
8
|
-
|
8
|
+
if name
|
9
|
+
new_slug = name.downcase.gsub(/[^a-z0-9\s]/i, '').gsub(' ', '-')
|
10
|
+
else
|
11
|
+
new_slug = '1'
|
12
|
+
end
|
9
13
|
if self.class.where( slug: new_slug ).first
|
10
14
|
loop do
|
11
15
|
if new_slug[new_slug.length-1].to_i != 0
|