echo_uploads 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/echo_uploads/model.rb +8 -1
- data/lib/echo_uploads/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 804822a92afb63c74d6ee6dd5a87dc4b0d017bf8
|
4
|
+
data.tar.gz: 3ef8ca40d697d45725331a3cab0f646318d16051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed779c8251d35a4d4e56df9b4098af245e5127aefb060bb5af18f9550febf82c2de8f102053ac87338c24a042567ec2626d2f43dd665e82e7a9852fd21d5c3cd
|
7
|
+
data.tar.gz: bfe6cbebde5c81dd5d1ba28479569621605e2e841735d5cfce07c6a57e8548b8e61d76d1a4c38fab69405feb05418a5cbc1da88c5c70e19b54046c286a20fb31
|
data/lib/echo_uploads/model.rb
CHANGED
@@ -120,10 +120,17 @@ module EchoUploads
|
|
120
120
|
self.echo_uploads_config = echo_uploads_config.merge attr => {}
|
121
121
|
|
122
122
|
# Define reader method for the file attribute.
|
123
|
-
if Rails::VERSION::MAJOR >= 5
|
123
|
+
if Rails::VERSION::MAJOR >= 5 and Rails::VERSION::MINOR >= 1
|
124
124
|
attribute attr
|
125
125
|
else
|
126
126
|
attr_reader attr
|
127
|
+
define_method("#{attr}=") do |file|
|
128
|
+
instance_variable_set "@#{attr}", file
|
129
|
+
if send(attr).present?
|
130
|
+
# Mark as dirty.
|
131
|
+
attribute_will_change! attr
|
132
|
+
end
|
133
|
+
end
|
127
134
|
end
|
128
135
|
|
129
136
|
# Define the accessor methods for the mapped version(s) of the file. Returns
|
data/lib/echo_uploads/version.rb
CHANGED
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
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarrett Colby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|