echo_uploads 0.0.4 → 0.0.5

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: 9302fa84aaf621556620c40904c1c8ead227b53d
4
- data.tar.gz: 8ffbf38511536c4fee0a341c19f8a30424d3f54f
3
+ metadata.gz: 7d5f3c3877293549591cb0b210da8b75841d3efb
4
+ data.tar.gz: 8715dbd533d79b3aa94b36bab80084d025510b92
5
5
  SHA512:
6
- metadata.gz: b53ba87f3dd560c8b163e2a8aba350f520eb982675a7c8629977816e473a80ea1b1d321dabc1716dade423ea20abaae833265f03b72f90be8966bc5a484ad2cc
7
- data.tar.gz: 6110cf77bc31bc2906bb89c24fd493792ce84926ec44dc966f989cee08019a541f821ba6f937d12de731a12e2c580335a7d5af6e33728986603225e62b662b56
6
+ metadata.gz: ad94175bf8c3bb5a456953dbca2823a11d4b764a85ef765adfb4ba0681aa50495b7c0b45972d5774c0737dce5a8fcb405ad7fbc23d420f1c1c8959375e2c5014
7
+ data.tar.gz: fd37684f880e8ad4e8a9534054cb4a7a3a4719cdd5ecff0852d4a901b2fecb1ecee8d661a0edcaf1ea55b62c33ce1708399e0819a7080da8df1b9ea65595af02
@@ -39,6 +39,12 @@ module EchoUploads
39
39
  )
40
40
  end
41
41
  send("#{attr}_metadatas=", metas)
42
+ elsif options[:map]
43
+ mapped_files = send("mapped_#{attr}")
44
+ metas = [::EchoUploads::File.new(
45
+ owner: model, temporary: false, file: mapped_files.first
46
+ )]
47
+ send("#{attr}_metadata=", metas.first)
42
48
  else
43
49
  metas = [::EchoUploads::File.new(
44
50
  owner: model, temporary: false, file: send(attr)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: echo_uploads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-09 00:00:00.000000000 Z
11
+ date: 2014-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types