diff options
author | George Claghorn <george.claghorn@gmail.com> | 2018-06-22 17:26:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 17:26:37 -0400 |
commit | 484f970c6c45af836f89e2bf2169bb15ca273ddd (patch) | |
tree | 01eff23e9fcac4f4c3d7a428a31a56441a92b9e9 | |
parent | 0a6b866ff2f45cea50598fc054763b89ea7affbe (diff) | |
parent | cc9010a33dace4ae74ae89ac73ea05effdce3cfc (diff) | |
download | rails-484f970c6c45af836f89e2bf2169bb15ca273ddd.tar.gz rails-484f970c6c45af836f89e2bf2169bb15ca273ddd.tar.bz2 rails-484f970c6c45af836f89e2bf2169bb15ca273ddd.zip |
Merge pull request #33198 from henrik/patch-1
Active Storage: Explicit form field in basic example
-rw-r--r-- | guides/source/active_storage_overview.md | 6 |
1 files changed, 5 insertions, 1 deletions
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. |