aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_storage_overview.md
diff options
context:
space:
mode:
authorHenrik Nyh <henrik@nyh.se>2018-06-22 21:55:06 +0100
committerGitHub <noreply@github.com>2018-06-22 21:55:06 +0100
commitcc9010a33dace4ae74ae89ac73ea05effdce3cfc (patch)
tree01eff23e9fcac4f4c3d7a428a31a56441a92b9e9 /guides/source/active_storage_overview.md
parent0a6b866ff2f45cea50598fc054763b89ea7affbe (diff)
downloadrails-cc9010a33dace4ae74ae89ac73ea05effdce3cfc.tar.gz
rails-cc9010a33dace4ae74ae89ac73ea05effdce3cfc.tar.bz2
rails-cc9010a33dace4ae74ae89ac73ea05effdce3cfc.zip
Active Storage: Explicit form field in basic example
Also fix syntax highlighting in the more advanced JS example.
Diffstat (limited to 'guides/source/active_storage_overview.md')
-rw-r--r--guides/source/active_storage_overview.md6
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.