pluck_all 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pluck_all.rb +4 -3
- data/lib/pluck_all/version.rb +1 -1
- data/pluck_all.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 378c4d5a457ca1c5fc1fdcd8b7d3c0cf99c7f384
|
4
|
+
data.tar.gz: b660f69cab16a7a0634acd5140383cd65c2eb7ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8f59e9f34c641b1215a0451a55e082da510de9376e11dd13e5f57e731f92236446e4b0a6908ff332ad5e252a8aa2502cabb9f3aa7cf2535ed705a7f1af64e3f
|
7
|
+
data.tar.gz: 749572698595cc02c2a184194f69146d06eab02ab837aeb2b13d0fab6196832a26812b6755553ffcc4537e127f837392c2e303692ef921a2d4664afde80b92fd
|
data/lib/pluck_all.rb
CHANGED
@@ -68,13 +68,14 @@ private
|
|
68
68
|
# Support casting CarrierWave url
|
69
69
|
#----------------------------------
|
70
70
|
def cast_carrier_wave_uploader_url(attributes)
|
71
|
-
if defined?(CarrierWave)
|
71
|
+
if defined?(CarrierWave) && klass.respond_to?(:uploaders)
|
72
72
|
@pluck_all_cast_klass ||= klass
|
73
73
|
@pluck_all_uploaders ||= @pluck_all_cast_klass.uploaders.select{|key, uploader| attributes.key?(key.to_s) }
|
74
74
|
@pluck_all_uploaders.each do |key, uploader|
|
75
|
-
|
75
|
+
hash = {}
|
76
|
+
@pluck_all_cast_need_columns.each{|k| hash[k] = attributes[k] } if @pluck_all_cast_need_columns
|
77
|
+
obj = @pluck_all_cast_klass.new(hash)
|
76
78
|
obj[key] = attributes[key_s = key.to_s]
|
77
|
-
@pluck_all_cast_need_columns.each{|s| obj[s] = attributes[s] } if @pluck_all_cast_need_columns
|
78
79
|
attributes[key_s] = obj.send(:_mounter, key).uploader #uploaders.first
|
79
80
|
end
|
80
81
|
end
|
data/lib/pluck_all/version.rb
CHANGED
data/pluck_all.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluck_all
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khiav reoy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03
|
11
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '5.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: activerecord
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|