aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshiyuki Hirano <yhirano@me.com>2017-09-17 17:40:20 +0900
committerYoshiyuki Hirano <yhirano@me.com>2017-09-17 17:44:04 +0900
commit194a93385b08be857172b8eb6287d335c5adf1ea (patch)
treea8c0f21e47f40e8e42b23364ca1fa94179725b3f
parentbf206dc2fc66f844c561329ca2fd9c0418d3ff90 (diff)
downloadrails-194a93385b08be857172b8eb6287d335c5adf1ea.tar.gz
rails-194a93385b08be857172b8eb6287d335c5adf1ea.tar.bz2
rails-194a93385b08be857172b8eb6287d335c5adf1ea.zip
Add local option to Message form [ci skip]
* MessagesController redirects to `GET /message/:id`. * It looks it don't expect XHR request. * `form_with` behaves for XHR by default. * I've added `local: true` option to `form_with`.
-rw-r--r--activestorage/README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/README.md b/activestorage/README.md
index 17d98978bb..5b73740f70 100644
--- a/activestorage/README.md
+++ b/activestorage/README.md
@@ -63,7 +63,7 @@ end
```
```erb
-<%= form_with model: @message do |form| %>
+<%= form_with model: @message, local: true do |form| %>
<%= form.text_field :title, placeholder: "Title" %><br>
<%= form.text_area :content %><br><br>