Sha256: 8b58f738c6d2b6476a41d7f5d24d1a848605a4cd03e5c447eb20e22a5578d00f

Contents?: true

Size: 413 Bytes

Versions: 71

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

module ActiveStorage::SetBlob # :nodoc:
  extend ActiveSupport::Concern

  included do
    before_action :set_blob
  end

  private
    def set_blob
      @blob = blob_scope.find_signed!(params[:signed_blob_id] || params[:signed_id])
    rescue ActiveSupport::MessageVerifier::InvalidSignature
      head :not_found
    end

    def blob_scope
      ActiveStorage::Blob
    end
end

Version data entries

71 entries across 68 versions & 6 rubygems

Version Path
activestorage-7.1.0 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.0.rc2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.0.rc1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.0.beta1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.8 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.7.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.7.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.7 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.6 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.5.1 app/controllers/concerns/active_storage/set_blob.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/app/controllers/concerns/active_storage/set_blob.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.5 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.4.3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.4.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.4.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.4 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.3.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.2.4 app/controllers/concerns/active_storage/set_blob.rb