active_storage-send_zip:从一个或多个Active Storage对象创建一个zip

时间:2021-02-05 23:24:35
【文件属性】:
文件名称:active_storage-send_zip:从一个或多个Active Storage对象创建一个zip
文件大小:14KB
文件格式:ZIP
更新时间:2021-02-05 23:24:35
rails activestorage RailsRuby ActiveStorage :: SendZip 在Rails控制器中添加send_zip方法,以发送包含一个或多个对象的.zip文件。 用法 带Array 假设您具有带有ActiveStorage的ActiveRecord模型,如下所示: # app/models/user.rb class User < ApplicationRecord has_many_attached :pictures end 您只需在控制器中包括ActiveStorage::SendZip并使用ActiveStorage::SendZip#send_zip方法。 只需传递一些对象作为参数: # ap
【文件预览】:
active_storage-send_zip-master
----active_storage-send_zip.gemspec(2KB)
----.gitignore(73B)
----CHANGELOG.yml(890B)
----bin()
--------setup(131B)
--------console(358B)
----.travis.yml(107B)
----CODE_OF_CONDUCT.md(3KB)
----LICENSE.txt(1KB)
----README.md(4KB)
----lib()
--------active_storage()
----Gemfile(178B)
----Rakefile(198B)
----test()
--------active_storage()
--------test_helper.rb(121B)
----Gemfile.lock(4KB)

网友评论