ish_models 0.0.33.133 → 0.0.33.134
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 +3 -0
- 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: 3d922df26e696ac770c512266ee8b46206cb27068acba43df008250e3d1f3a62
|
4
|
+
data.tar.gz: 3fbc130546d38392d78fef959448eea0642a70cb76cdd9194f3924867877d204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98cebce56b2f8a979808d1e1e2bff952601fb7322bcbde228d8ec643656da4b665849782a4a1a5e30eabc36c747b70b57d9d950b1cd544d63444bf93ca5d79e9
|
7
|
+
data.tar.gz: 73c95a9da8539641a6f5f9d14a2d0c27721f713cad23223727927aa5eb2e422b464007a277810262b20fd6a052882ecd4f79fe1faaf24c83093a7152af198ad2
|
data/lib/gallery.rb
CHANGED
@@ -39,6 +39,9 @@ class Gallery
|
|
39
39
|
|
40
40
|
field :galleryname
|
41
41
|
index({ :galleryname => -1 }, { :unique => true })
|
42
|
+
def slug
|
43
|
+
galleryname
|
44
|
+
end
|
42
45
|
embeds_many :gallery_names, :class_name => '::Ish::GalleryName'
|
43
46
|
def self.find_by_slug slug
|
44
47
|
::Gallery.where( galleryname: slug ).first
|