polygallery 0.1.7 → 0.1.8
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47b217d27d6e5bc745682fea19ee2edba9c352e8
|
|
4
|
+
data.tar.gz: 65dc16aa4afa698c787e179a09ab285789163a99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 680d22bf90e327e3d62a86a759489dff856e7f0aa75cb9601a07a93e4556caf44fc87398c4b9dae584aa7e4f8e5ae34e930a6b497534f89d88d77b4915e80657
|
|
7
|
+
data.tar.gz: 2ecce0e9a173a882458f7df4304e58edcbf64737082d55222bf2075b9b2d7ea9078d7d442158b8972f3272dfd988f3dd4e35d9aec237d5e751a1afc2f5927815
|
|
@@ -82,7 +82,8 @@ module Polygallery
|
|
|
82
82
|
accepts_nested_attributes_for settings[:association_names][:gallery],
|
|
83
83
|
settings[:nested_attributes][:gallery]
|
|
84
84
|
accepts_nested_attributes_for settings[:association_names][:photos],
|
|
85
|
-
|
|
85
|
+
settings[:nested_attributes][:photos].deep_merge({
|
|
86
|
+
:source => settings[:association_names][:photos] })
|
|
86
87
|
|
|
87
88
|
after_initialize :build_galleries
|
|
88
89
|
|
|
@@ -20,6 +20,11 @@ module Polygallery
|
|
|
20
20
|
|
|
21
21
|
settings = defaults.deep_merge options
|
|
22
22
|
|
|
23
|
+
has_many association_names[:photos],
|
|
24
|
+
settings[:associations][:photos].deep_merge({})
|
|
25
|
+
accepts_nested_attributes_for association_names[:photos],
|
|
26
|
+
settings[:nested_attributes][:photos]
|
|
27
|
+
|
|
23
28
|
after_initialize do
|
|
24
29
|
@polygallery_settings = settings if settings == HasPolygallery::DEFAULTS
|
|
25
30
|
self.initialize_polygallery
|
|
@@ -54,10 +59,10 @@ module Polygallery
|
|
|
54
59
|
def initialize_polygallery
|
|
55
60
|
settings = self.polygallery_settings
|
|
56
61
|
association_names = settings[:association_names]
|
|
57
|
-
self.class.has_many association_names[:photos],
|
|
58
|
-
|
|
59
|
-
self.class.accepts_nested_attributes_for association_names[:photos],
|
|
60
|
-
|
|
62
|
+
# self.class.has_many association_names[:photos],
|
|
63
|
+
# settings[:associations][:photos].deep_merge({})
|
|
64
|
+
# self.class.accepts_nested_attributes_for association_names[:photos],
|
|
65
|
+
# settings[:nested_attributes][:photos]
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
def build_first_photo
|
data/lib/polygallery/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polygallery
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MacKinley Smith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|