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`.
This commit is contained in:
parent
bf206dc2fc
commit
194a93385b
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue