polygallery 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/polygallery/has_polygallery.rb +3 -3
- data/lib/polygallery/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e1176b4a4e7c3fb8b6ec4d32e8cfccaf247d895
|
|
4
|
+
data.tar.gz: 68dfde3d0e5335649bae740ab3a160e0a25de14d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01b8d1702a15aa205bbf9668afafc5f3b62d57a728de4efb16caf983e88014f4d2ba10913aeea77cb280411946da64396fc30c139ad0062c56c98c7c2ce84965
|
|
7
|
+
data.tar.gz: 8c6ae0130cd97e0e8a6eed028df5c3a847094a05bb65ee16f7fc4d985a0a06eb6b0471d585885061a43d7310b027314f49caa17e562dc9684657aafd763925ef
|
|
@@ -8,7 +8,7 @@ module Polygallery
|
|
|
8
8
|
|
|
9
9
|
module ClassMethods
|
|
10
10
|
def has_polygallery(title='gallery', options={})
|
|
11
|
-
defaults =
|
|
11
|
+
defaults = Gallery::DEFAULTS
|
|
12
12
|
settings = defaults.deep_merge(options)
|
|
13
13
|
has_one title.to_sym, -> { where(:title => title.to_s) }, settings[:association]
|
|
14
14
|
accepts_nested_attributes_for title.to_sym, settings[:nested_attributes]
|
|
@@ -16,7 +16,7 @@ module Polygallery
|
|
|
16
16
|
send("build_#{title.to_s}".to_sym) if send(title.to_sym).nil?
|
|
17
17
|
send(title.to_sym).settings = settings
|
|
18
18
|
end
|
|
19
|
-
include
|
|
19
|
+
include HasPolygallery::LocalInstanceMethods
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def polygalleries
|
|
@@ -30,7 +30,7 @@ module Polygallery
|
|
|
30
30
|
|
|
31
31
|
module LocalInstanceMethods
|
|
32
32
|
def polygalleries
|
|
33
|
-
|
|
33
|
+
Gallery.select('polygallery_galleries.title')
|
|
34
34
|
.where(:galleryable => self)
|
|
35
35
|
.group('polygallery_galleries.title')
|
|
36
36
|
.map(&:title)
|
data/lib/polygallery/version.rb
CHANGED