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: fabe9747e2178faa7af123d824736b7258cf2718
4
- data.tar.gz: b8d626a8c4691873937826adcda97073d50de55d
3
+ metadata.gz: 47b217d27d6e5bc745682fea19ee2edba9c352e8
4
+ data.tar.gz: 65dc16aa4afa698c787e179a09ab285789163a99
5
5
  SHA512:
6
- metadata.gz: e758648eeaeb6e2dc71a5c62f6ffc3dcbc845987e0fd4480a41022a74fef2566f88bf5431a0a3cd773489aab6bd011dce1f56add26757b789116e1b785cca63c
7
- data.tar.gz: beca903a3da3946582a63e25233cee6ab551a98ab94421e2d61495e8e86f7d8cef456c78891025f59eb467a672c5d90f653bca66b6d2a7dd4a1db20363cb43d7
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
- settings[:nested_attributes][:photos]
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
- settings[:associations][:photos].deep_merge({})
59
- self.class.accepts_nested_attributes_for association_names[:photos],
60
- settings[:nested_attributes][:photos]
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
@@ -1,3 +1,3 @@
1
1
  module Polygallery
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -18,4 +18,4 @@ module Polygallery
18
18
  end
19
19
 
20
20
  end
21
- end
21
+ end
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.7
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-26 00:00:00.000000000 Z
11
+ date: 2015-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails