ActionController::InvalidAuthenticityToken

I have fixed this problem by include prototype in template
<%= javascript_include_tag "prototype" %>