activestorage-delayed 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/initializers/upload_default_variation.rb +2 -1
- data/lib/activestorage-delayed/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21cd7652c2fbe15057bf6f36a36c7ec510ed1e622f5adb0e0f566f5a2e30c111
|
4
|
+
data.tar.gz: e16a8f72a0cc7049dfccb958499ba112659abcf0afbf03e9961fdcaea6cd76cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c69f49fc4c77684d71a9ccc9b6fdf09bdea824a0f6588974024dce997ebfe7bac49bfa0c257a8c4610437a133837d00a3040e812b8d1014f9efb5c078104079
|
7
|
+
data.tar.gz: '0802bc892fa31b38e35042860919944b7eeee09811057eb082d0a4eaf426d880a624aa306835e75acbf54cc9cf0e631c3ab5a07e18307a0f9c70ef9b99492160'
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Note: This gem assumes that the app has already configured activestorage.
|
|
13
13
|
## Installation
|
14
14
|
- Add this line to your application's Gemfile:
|
15
15
|
```ruby
|
16
|
-
gem 'activestorage-delayed', '>= 0.1.
|
16
|
+
gem 'activestorage-delayed', '>= 0.1.3'
|
17
17
|
```
|
18
18
|
- And then execute: `bundle install`
|
19
19
|
- Generate the migration: `rails g migration add_activestorage_delayed`
|
@@ -6,12 +6,13 @@ module ActivetoragePreprocessDefaultVariation
|
|
6
6
|
base.extend(ClassMethods)
|
7
7
|
end
|
8
8
|
|
9
|
-
def upload_without_unfurling(io)
|
9
|
+
def upload_without_unfurling(io) # rubocop:disable Metrics/MethodLength
|
10
10
|
variant = attachments.first.try(:send, :variants)
|
11
11
|
default_variant = variant ? variant[:default] : nil
|
12
12
|
if default_variant && self.class.enabled_default_variant?
|
13
13
|
ActiveStorage::Variation.wrap(default_variant).transform(io) do |output|
|
14
14
|
unfurl output, identify: identify
|
15
|
+
save! if id.present? # update new unfurl information
|
15
16
|
super(output)
|
16
17
|
end
|
17
18
|
else
|