active_content 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69e6ab100952a697d93027b3085740b05123598010faa3ca3a24528292ecc879
4
- data.tar.gz: fe9d1068cafd56ae2e212110d15cbbfefe8b559e09f69bfc52d3b614b4ebd5fa
3
+ metadata.gz: 54dd08b5ee40815a48b44705c2b9bd79186b6c3be077a5631da9c6fd1d976d1f
4
+ data.tar.gz: '00259475624098116bd05bf7609eb9e83566c7b1d6ba88efcb8f2644dead8abb'
5
5
  SHA512:
6
- metadata.gz: 240307abe84eab9d13e0d84e19025f5ddfe038e3f0c852cc1a6d0939249fbf3004b3a3544e0e218a1c9a45da682fe8ef406571e9310dc6bcac4d71b46af9f255
7
- data.tar.gz: 843821d493f12f804721e72f1962c6ee06dfa094c315acf8ecf6c3526f6a5e01cbab720d9b011ece5eca12a4f0cbf8f19a18f1286583b17f48e09cb366e6e89c
6
+ metadata.gz: 071d74c8c0106b0915ee5906fe6ac6601670db09db01c52eef2eba30140348f34d48ed98c5e1270f7b6ce90b6fe2c31031ef2975cf33dc917355d53bc971b5d7
7
+ data.tar.gz: b8b9341b078962dbfcff04eef8c2a156ba67150a84996452b43283d3cc20f49e6e64deb413e69c38641288a939451a4d7e64749b08450e70598aba367a4b9b28
@@ -10,13 +10,15 @@ class ActiveContent::Profile < ActiveRecord::Base
10
10
 
11
11
  # Pick correct uploader after initialize for profileable class
12
12
  after_initialize do
13
- class_name = :"#{profileable.class.name.underscore}_image"
14
- base_class = :"#{profileable.class.base_class.name.underscore}_image"
15
-
16
- self.class.uploaders[:image] = begin
17
- self.class.image_uploaders[class_name] ||
18
- self.class.image_uploaders[base_class] ||
19
- self.class.image_uploaders[:image]
13
+ unless profileable.nil?
14
+ class_name = :"#{profileable.class.name.underscore}_image"
15
+ base_class = :"#{profileable.class.base_class.name.underscore}_image"
16
+
17
+ self.class.uploaders[:image] = begin
18
+ self.class.image_uploaders[class_name] ||
19
+ self.class.image_uploaders[base_class] ||
20
+ self.class.image_uploaders[:image]
21
+ end
20
22
  end
21
23
  end
22
24
 
@@ -1,3 +1,3 @@
1
1
  module ActiveContent
2
- VERSION = '0.1.9'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olibia Tsati
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-06-01 00:00:00.000000000 Z
12
+ date: 2018-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord