From cc9010a33dace4ae74ae89ac73ea05effdce3cfc Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Fri, 22 Jun 2018 21:55:06 +0100 Subject: Active Storage: Explicit form field in basic example Also fix syntax highlighting in the more advanced JS example. --- guides/source/active_storage_overview.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md index 5f8beb7439..9fabc011c8 100644 --- a/guides/source/active_storage_overview.md +++ b/guides/source/active_storage_overview.md @@ -230,6 +230,10 @@ end You can create a user with an avatar: +```erb +<%= form.file_field :avatar %> +``` + ```ruby class SignupController < ApplicationController def create @@ -479,7 +483,7 @@ directly from the client to the cloud. 2. Annotate file inputs with the direct upload URL. - ```ruby + ```erb <%= form.file_field :attachments, multiple: true, direct_upload: true %> ``` 3. That's it! Uploads begin upon form submission. -- cgit v1.2.3