etabliocms_galleries 0.0.7 → 0.0.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.
@@ -6,6 +6,8 @@ module EtabliocmsGalleries
6
6
  attr_accessor :attachable_temp
7
7
  belongs_to :attachable, :polymorphic => true
8
8
  before_save :set_attachable
9
+ before_save :set_pictures
10
+ attr_accesor :pictures_array
9
11
 
10
12
  scope :visible, where(:visible => true)
11
13
 
@@ -17,8 +19,8 @@ module EtabliocmsGalleries
17
19
  has_many :pictures, :order => 'position asc', :dependent => :destroy, :class_name => 'EtabliocmsGalleries::Picture'
18
20
  accepts_nested_attributes_for :pictures, :allow_destroy => true
19
21
 
20
- def pictures_array=(array)
21
- array.each do |file|
22
+ def set_pictures
23
+ pictures_array.each do |file|
22
24
  pictures.build(:data => file)
23
25
  end
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module EtabliocmsGalleries
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etabliocms_galleries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: