Hi,
I’ve got some basic form:
<%= form_for(@task, remote: true, html: {'data-type' => 'html'}) do
|f|
%>
<%= f.text_field :text %>
<%= f.submit %>
<% end %>
But when I submit it with no javascript enabled, I get:
Started POST "/tasks" for ::1 at 2015-02-02 23:38:27 +0200
Processing by TasksController#create as HTML
Parameters: {"utf8"=>"✓", "task"=>{"text"=>"adsf"},
“commit”=>“Create
Task”}
Can’t verify CSRF token authenticity
Completed 422 Unprocessable Entity in 5ms
ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):
actionpack (4.2.0)
lib/action_controller/metal/request_forgery_protection.rb:181:in
`handle_unverified_request’
…
How do I remedy this?
Regards,
Yuri