Skip to content
Permalink
Branch: master
Commits on Oct 17, 2019
  1. Ensure public-read ACL for S3 service with public mode.

    huacnlee committed Oct 17, 2019
Commits on Oct 6, 2018
Commits on Jun 30, 2018
Commits on Jun 29, 2018
  1. Add :expires_in option support for RedisCacheStore increment/decremen…

    huacnlee committed Jun 29, 2018
    …t method.
Commits on Mar 21, 2018
  1. Fix Cache `read_multi` with local_cache return values.

    huacnlee committed Mar 21, 2018
    It should returns raw value, not instance of `ActiveSupport::Cache::Entry`.
Commits on Feb 8, 2018
  1. Fix `blob.service_url` for supports string or nil `:filename` option.

    huacnlee committed Feb 8, 2018
    - Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`.
    - Add `ActiveStorage::Filename.wrap` method.
    
    before:
    
    ```rb
    blob.service_url(filename: ActiveStorage::Filename.new("new.txt"))
    
    blob.service_url(filename: "new.txt")
    => NoMethodError: undefined method `parameters' for "new.txt":String
    
    params = {}
    blob.service_url(filename: params[:filename])
    => NoMethodError: undefined method `parameters' for nil:NilClass
    ```
    
    after:
    
    ```rb
    blob.service_url(filename: "new.txt")
    blob.service_url(filename: nil)
    ```
Commits on Feb 1, 2018
  1. Allow `ActiveStorage::Blob#service_url` to pass addition options to `…

    huacnlee committed Feb 1, 2018
    …service.url`.
    
    Because there have some service needs more parameters for file URL:
    
    https://www.alibabacloud.com/help/doc-detail/44687.htm
    
    ```rb
    class AliyunService < Service
      def url(key, options = {})
        image_process = options[:oss_process] || "image/resize,w_800"
        "http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=#{image_process}"
      end
    end
    ```
    
    Use case:
    
    ```erb
    <%= image_tag @user.avatar.service_url(oss_process: "image/resize,m_fill,h_100,w_100" %>
    ```
You can’t perform that action at this time.