Posting JSON from iOS to Rails 3.1 (Stringify_keys error)

允我心安 提交于 2019-12-08 07:28:29

You will most likely have to disable the authentication token verification for your action.

Just put the following line in your controller and everything should work.

protect_from_forgery :except => :index

However if you do that make sure that you have some form of custom protection on your #create function. You can read this for more info: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!