RESTful login with devise (Rails 4)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I do RESTful sign-up and sign-in using devise in Ruby on Rails (I am using version 4)? I could not find any documentation with regards to the parameters (e.g. email, password) that I should POST to the server. It seems that RESTful login using JSON data (e.g. via AJAX) is not supported out of the box in the current version of devise - the default behavior is to send back a whole HTML page for any type of request made, instead of a JSON object for handling JSON request specifically. Does this mean that I need to create/extend custom