From 194a93385b08be857172b8eb6287d335c5adf1ea Mon Sep 17 00:00:00 2001 From: Yoshiyuki Hirano Date: Sun, 17 Sep 2017 17:40:20 +0900 Subject: 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`. --- activestorage/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" %>
<%= form.text_area :content %>

-- cgit v1.2.3