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-8.0.0 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.2.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.5 app/controllers/concerns/active_storage/set_blob.rb
activestorage-8.0.0.rc2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.2.1.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.4.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.8.6 app/controllers/concerns/active_storage/set_blob.rb
activestorage-8.0.0.rc1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.2.1.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.4.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.0.8.5 app/controllers/concerns/active_storage/set_blob.rb
activestorage-8.0.0.beta1 app/controllers/concerns/active_storage/set_blob.rb
omg-activestorage-8.0.0.alpha9 app/controllers/concerns/active_storage/set_blob.rb
omg-activestorage-8.0.0.alpha8 app/controllers/concerns/active_storage/set_blob.rb
omg-activestorage-8.0.0.alpha7 app/controllers/concerns/active_storage/set_blob.rb
omg-activestorage-8.0.0.alpha4 app/controllers/concerns/active_storage/set_blob.rb
omg-activestorage-8.0.0.alpha3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.1.4 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.2.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-7.2.0 app/controllers/concerns/active_storage/set_blob.rb