I'm following the rails getting started guide here: http://guides.rubyonrails.org/getting_started.html
I'm on the step 'Creating posts', where I setup my new view to submit a post to my controller. When I click the submit button in the view I get the error ActionController::InvalidAuthenticityToken
I was able to get past the error by commenting out this line in the ApplicationController
protect_from_forgery with: :exception
However I'm not sure if I should be doing that. Is that fine or should I dig deeper into the problem? What does that line do?
Content of: /views/layouts/application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Budget</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>