lazy_blob_storage 2.0.0.pre.beta.1 → 2.0.0.pre.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/models/concerns/lazy_attachable.rb +1 -1
- data/lib/lazy_blob_storage/version.rb +1 -1
- data/lib/tasks/lazy_blob_storage_tasks.rake +0 -3
- 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: c675223c056ffa300a4910dea9ff45c01ea77c8115d673e530105dc85e7fdc4e
|
4
|
+
data.tar.gz: 54b144adb7025c08c862333874cb2943f84177020fa4b5965003232c8353bb27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88c198067cdf6ec766b975ee96c3c22553c7b6832491db51cc681d616b9b735abfc1dd02c151a5141bc22ac905a2cdb51fd343f6869328f9179fb2f720e1e6f
|
7
|
+
data.tar.gz: 261c7c6e70daa001281b284edd136ea5551f55ac50173c5ab5c0bd3c471ca192ebf3e4db2c73a55474c49cfa1e1c5adc7b499b93db46902eced3d94b7d7fe2c4
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Built with Rails 6. It could ~probably~ work with Rails 4/5, too.
|
|
37
37
|
## Usage
|
38
38
|
|
39
39
|
1. Add `gem "lazy_blob_storage" to Gemfile`
|
40
|
-
1. Run `rake
|
40
|
+
1. Run `rake lazy_blob_storage_engine:install:migrations`
|
41
41
|
1. Run `rake db:migrate`
|
42
42
|
1. Declare `has_lazy_attached :image` in some model
|
43
43
|
1. Add `f.file_field :image_upload` to the form template
|
@@ -26,7 +26,7 @@ module LazyAttachable
|
|
26
26
|
|
27
27
|
define_method("validate_size_of_#{name}_upload") do
|
28
28
|
if (send "#{name}_upload").present? && !(send "#{name}_upload_size_ok?")
|
29
|
-
errors.add("#{name}_upload", "file too large (limit
|
29
|
+
errors.add("#{name}_upload", "file too large (limit #{(LazyBlobStorage.max_blob_size || LazyBlobStorage.default_max_blob_size) / 1_000} kb")
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -1,7 +1,4 @@
|
|
1
1
|
namespace :lazy_blob_storage do
|
2
|
-
# Prevent migration installation task from showing up twice.
|
3
|
-
Rake::Task["install:migrations"].clear_comments
|
4
|
-
|
5
2
|
desc "Copy over the migration needed to the application"
|
6
3
|
task install: :environment do
|
7
4
|
if Rake::Task.task_defined?("lazy_blob_storage:install:migrations")
|