From 5d3ebb71059f635d3756cbda4ab9752027e09256 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 25 Jun 2018 16:22:49 +0200 Subject: [PATCH] Simpler import style Which match the other imports. --- activestorage/README.md | 2 +- guides/source/active_storage_overview.md | 2 +- .../rails/app/templates/app/javascript/packs/application.js.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activestorage/README.md b/activestorage/README.md index b677721d95..a6004b0a00 100644 --- a/activestorage/README.md +++ b/activestorage/README.md @@ -116,7 +116,7 @@ Active Storage, with its included JavaScript library, supports uploading directl ``` Using the npm package: ```js - import * as ActiveStorage from "activestorage" + import ActiveStorage from "activestorage" ActiveStorage.start() ``` 2. Annotate file inputs with the direct upload URL. diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md index 9fabc011c8..6e272d585d 100644 --- a/guides/source/active_storage_overview.md +++ b/guides/source/active_storage_overview.md @@ -477,7 +477,7 @@ directly from the client to the cloud. Using the npm package: ```js - import * as ActiveStorage from "activestorage" + import ActiveStorage from "activestorage" ActiveStorage.start() ``` diff --git a/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt b/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt index 4d7a145cd6..6e8f4edf2d 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt @@ -12,7 +12,7 @@ Turbolinks.start() <%- end -%> <%- unless skip_active_storage? -%> -import * as ActiveStorage from "activestorage" +import ActiveStorage from "activestorage" ActiveStorage.start() <%- end -%> <%- unless options[:skip_action_cable] -%>