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
Post a Comment