Sha256: cddfc0a6666f25a5d08923a98b4f0c0cd133aba5546641fa645900a6598e2a01

Contents?: true

Size: 367 Bytes

Versions: 37

Compression:

Stored size: 367 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 = ActiveStorage::Blob.find_signed!(params[:signed_blob_id] || params[:signed_id])
    rescue ActiveSupport::MessageVerifier::InvalidSignature
      head :not_found
    end
end

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
activestorage-6.1.7.10 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.9 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.8 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.7 app/controllers/concerns/active_storage/set_blob.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-6.1.6.1/app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.6 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.5 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.4 app/controllers/concerns/active_storage/set_blob.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-6.1.6.1/app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.7 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.6.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.6 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.5.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.5 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.7 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.6 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.5 app/controllers/concerns/active_storage/set_blob.rb