carrierwave-serializable 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 82b85107d099ff5b2a82563dbf639e3ca631c6c2
4
- data.tar.gz: a2798da3550f46b3d7be053cb3d43fbff509741c
3
+ metadata.gz: 85af84b7e090dc29a19a30738b95aec95316b96a
4
+ data.tar.gz: cc4df2426c9db2824ec349d6ef2653dbdcb94721
5
5
  SHA512:
6
- metadata.gz: cb3c735071dd56ae4a164be785e66d0222dbdf562a52a89f4f2b52687854f9af98155d34368d528d2bbea4484558dab56b5056f19612e9fe7fe4a1ded933947d
7
- data.tar.gz: 54d6de876914bf435231947a1f5363bcd0a821a3be78243b0cbc3c56e6d1c476f202e13310ea46406cfa0aba7607aaace1e7ce692f2b150584ac2486e2f8bce8
6
+ metadata.gz: 3d7312e8652486a614abad5675d1845a37d9180cb9ede08812d26aff0ec5c4c1636eefd9e7f1a00f1615f57af73c062f6a9c5a48291140c6bdf34f3518163267
7
+ data.tar.gz: 1bdf2d6bc8c7400e1c78e1af0babf2045dfced058d1eab8a8098718456c04bd37ad8e8176ff44db32ff75c5ee600ebd4b2a1074d7771e69102720d827bc765e0
@@ -10,9 +10,25 @@ module CarrierWave
10
10
  end
11
11
 
12
12
  def serialized_uploader?(column)
13
- serialized_uploaders.key?(column) && serialized_attributes.key?(serialized_uploaders[column].to_s)
13
+ attribute_name = serialized_uploaders[column].to_s
14
+ serialized_uploaders.key?(column) && (serialized_attribute?(attribute_name) ||
15
+ hstore_attribute?(attribute_name) ||
16
+ json_attribute?(attribute_name))
17
+
18
+ end
19
+
20
+ def serialized_attribute?(attribute)
21
+ serialized_attributes.key?(attribute)
22
+ end
23
+
24
+ def hstore_attribute?(attribute)
25
+ columns_hash[attribute.to_s].type == :hstore
26
+ end
27
+
28
+ def json_attribute?(attribute)
29
+ columns_hash[attribute.to_s].type == :json
14
30
  end
15
-
31
+
16
32
  ##
17
33
  # See +CarrierWave::Mount#mount_uploader+ for documentation
18
34
  #
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module Serializable
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-serializable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tima Maslyuchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-04 00:00:00.000000000 Z
11
+ date: 2013-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave