NameError wile add config.action_view.embed_authenticity_token_in_remote_forms to true
<p>I was working on ajax on my rails app and I got a ActionController::InvalidAuthenticityToken error. </p>

<p>and I read this </p>

<blockquote>
  <p>config.action_view.embed_authenticity_token_in_remote_forms allows you
  to set the default behavior for authenticity_token in forms with
  remote: true. By default it's set to false, which means that remote
  forms will not include authenticity_token, which is helpful when
  you're fragment-caching the form. Remote forms get the authenticity
  from the meta tag, so embedding is unnecessary unless you support
  browsers without JavaScript. In such case you can either pass
  authenticity_token: true as a form option or set this config setting
  to true.</p>
</blockquote>

<p>from <a href="http://edgeguides.rubyonrails.org/configuring.html" rel="nofollow">RailsGuides</a></p>

<p>so  I add <code>config.action_view.embed_authenticity_token_in_remote_forms=true</code> to \config\application.rb</p>

<p>and restart rails server ,then an error happened</p>

<p><em>/Users/haha/railsbridge/railsfun/ruby12weeks/eat/config/application.rb:5:in': undefined local variable or method config' for main:Object (NameError)</em></p>

<p>Did I put it to wrong place?</p>

<p>this is <a href="https://github.com/qjpioneer/Foodie" rel="nofollow">my github</a></p>