ruby on rails - Why does HTTP delete need javascript to work? -


i working devise in rails , while setting sign_out function run errors. noticed than, happened because pages have sign_out link skipped layouts javascript inactive. enabling javascript with:`

<%= javascript_include_tag :defaults %> 

everything worked fine.

why work that?

links (normally) requests. in order link send non-get request need javascript modifies behaviour of link.

in addition browsers typically support get/post requests rails fakes other methods (delete, put,...) adding _method field post.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -