activestorage-delayed 0.1.3 → 0.1.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
  SHA256:
3
- metadata.gz: 21cd7652c2fbe15057bf6f36a36c7ec510ed1e622f5adb0e0f566f5a2e30c111
4
- data.tar.gz: e16a8f72a0cc7049dfccb958499ba112659abcf0afbf03e9961fdcaea6cd76cd
3
+ metadata.gz: 76f19f1856294d83f52a92dbbc1ea9eb52c216c021726437ff513727426c65e4
4
+ data.tar.gz: 923f537ec4dbbfd797c72157f46b58a1a1f20f04127f53034f444fd6a2cd8ac2
5
5
  SHA512:
6
- metadata.gz: 1c69f49fc4c77684d71a9ccc9b6fdf09bdea824a0f6588974024dce997ebfe7bac49bfa0c257a8c4610437a133837d00a3040e812b8d1014f9efb5c078104079
7
- data.tar.gz: '0802bc892fa31b38e35042860919944b7eeee09811057eb082d0a4eaf426d880a624aa306835e75acbf54cc9cf0e631c3ab5a07e18307a0f9c70ef9b99492160'
6
+ metadata.gz: ea37e642bef6ef9ba231b0bc0b2c8c1676b569679be5373bd45cd5f6cbd7f8aff4d1ac3642e1f6853fddf8e46f55f19293a38cf9fee4a60061b671c5cb27a3b0
7
+ data.tar.gz: 80d2123dec2953c7c8778e0f7fa9449e73b7f25625863e05f0edaf5c07e3c6782c3e4b44f824c14ab61bb3dc03a834ec94c6eebc340b298fb7061d11f02208fe
data/README.md CHANGED
@@ -39,7 +39,7 @@ Note: This gem assumes that the app has already configured activestorage.
39
39
  class User < ApplicationRecord
40
40
  include ActivestorageDelayed::DelayedConcern
41
41
 
42
- has_one_attached :photo, require: true, use_filename: true
42
+ has_one_attached :photo, required: true, use_filename: true
43
43
  delayed_attach :photo
44
44
 
45
45
  has_many_attached :certificates
@@ -48,7 +48,7 @@ end
48
48
 
49
49
  ```
50
50
  ### `delayed_attach` accepts an optional hash with the following options:
51
- - `require`: If set to `true`, the `photo` or the `photo_tmp` will be required before saving.
51
+ - `required`: If set to `true`, the `photo` or the `photo_tmp` will be required before saving.
52
52
  - `use_filename`: If set to `true`, the image filename will be used as the name of uploaded file instead of the hash-key used by `activestorage`
53
53
 
54
54
  ### Examples to upload files in background
@@ -10,7 +10,7 @@ module ActivestorageDelayed
10
10
  self.table_name = 'activestorage_delayed_uploads'
11
11
  attr_accessor :tmp_files
12
12
 
13
- belongs_to :uploadable, polymorphic: true
13
+ belongs_to :uploadable, polymorphic: true, touch: true
14
14
 
15
15
  before_save :parse_tmp_files
16
16
  after_create_commit do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActivestorageDelayed
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage-delayed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo Diaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2022-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage