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.4.4 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.2 app/controllers/concerns/active_storage/set_blob.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activestorage-6.1.4.1/app/controllers/concerns/active_storage/set_blob.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/activestorage-6.1.4.1/app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4.1 app/controllers/concerns/active_storage/set_blob.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/activestorage-6.1.4/app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.4 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.3.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.3.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.3 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.2.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.1 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.0 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.0.rc2 app/controllers/concerns/active_storage/set_blob.rb
activestorage-6.1.0.rc1 app/controllers/concerns/active_storage/set_blob.rb