diff options
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | lib/active_storage.rb | 2 | ||||
-rw-r--r-- | lib/active_storage/engine.rb (renamed from lib/active_storage/railtie.rb) | 2 | ||||
-rw-r--r-- | lib/active_storage/migration.rb | 16 |
4 files changed, 16 insertions, 12 deletions
@@ -65,7 +65,7 @@ end ## Installation -1. Add `require "active_storage"` to config/application.rb. +1. Add `require "active_storage"` to config/application.rb, after `require "rails/all"` line. 2. Run `rails activestorage:install` to create needed directories, migrations, and configuration. 3. Configure the storage service in `config/environments/*` with `config.active_storage.service = :local` that references the services configured in `config/storage_services.yml`. @@ -78,9 +78,13 @@ end - Convert MirrorService to use threading - Read metadata via Marcel? - Add Migrator to copy/move between services -- Explore direct uploads to cloud +- [Explore direct uploads to cloud](https://github.com/rails/activestorage/pull/19) - Extract VerifiedKeyWithExpiration into Rails as a feature of MessageVerifier +## Roadmap + +This separate repository is a staging ground for eventual inclusion in rails/rails prior to the Rails 5.2 release. It is not intended to be a long-term stand-alone repository. Compatibility with prior versions of Rails is not a development priority either. + ## License Active Storage is released under the [MIT License](https://opensource.org/licenses/MIT). diff --git a/lib/active_storage.rb b/lib/active_storage.rb index f72fe0d017..8b867f0145 100644 --- a/lib/active_storage.rb +++ b/lib/active_storage.rb @@ -1,5 +1,5 @@ require "active_record" -require "active_storage/railtie" if defined?(Rails) +require "active_storage/engine" if defined?(Rails) module ActiveStorage extend ActiveSupport::Autoload diff --git a/lib/active_storage/railtie.rb b/lib/active_storage/engine.rb index 76894c2e16..3512be0468 100644 --- a/lib/active_storage/railtie.rb +++ b/lib/active_storage/engine.rb @@ -1,4 +1,4 @@ -require "rails/railtie" +require "rails/engine" module ActiveStorage class Engine < Rails::Engine # :nodoc: diff --git a/lib/active_storage/migration.rb b/lib/active_storage/migration.rb index dce666edc1..c56e7a1786 100644 --- a/lib/active_storage/migration.rb +++ b/lib/active_storage/migration.rb @@ -1,13 +1,13 @@ class ActiveStorageCreateTables < ActiveRecord::Migration[5.1] # :nodoc: def change create_table :active_storage_blobs do |t| - t.string :key - t.string :filename - t.string :content_type - t.text :metadata - t.integer :byte_size - t.string :checksum - t.time :created_at + t.string :key + t.string :filename + t.string :content_type + t.text :metadata + t.integer :byte_size + t.string :checksum + t.datetime :created_at t.index [ :key ], unique: true end @@ -17,7 +17,7 @@ class ActiveStorageCreateTables < ActiveRecord::Migration[5.1] # :nodoc: t.string :record_gid t.integer :blob_id - t.time :created_at + t.datetime :created_at t.index :record_gid t.index :blob_id |