Search code examples
ruby-on-railsrubyrails-activestorageruby-on-rails-5.2

Rails ActiveStorage - accessing through Rails console


ActiveStorage creates 2 tables active_storage_blobs and active_storage_attachments. I wonder if there is a way to access them easily through Rails console (i.e. schema migration internal table can be accessed by ActiveRecord::SchemaMigration)?


Solution

  • Rails is open source, fwiw.

    Looks like it’d be ActiveStorage::Blob and ActiveStorage::Attachment.