ruby on rails - Sign Out working locally, but not working on Heroku -
So I'm planning for logout / logout I have noticed that my sign_out link is working locally well , But I did not work on Hiroko even after adding, committed and pushing.
Here is what I see in my beat log
2014-04-23T22: 16: 09.987029 + 00: 00 Heroko [router]: on = info method = Path = / user / sign-out host = peaceful-toll -4795.herokuapp.com request_id = 16559a9f -0cff-4179-8aeb-d393ae44de38 fwd = "108.233.86.201" dyno = web.1 connect = 60ms service = 34ms position = 404 bytes = 1616 Note that it tries to use when it should be DELETE Get the method of signing out when using the GET method when my paths are correct Huh?
Rack path: prefix verb URI pattern controller # operation new_user_session GET / user / sign-in (.format :) / devise / Session # new user_session POST / Users / Sign-In (.: Format) devise / sessions # create_user_session DELETE /users/sign_out(.:format) devise / sessions # user_password POST / users / password (.format :) format / password # Create new_user_password Get / User / Password / New (.: Format) Create / Password # Get new edit_user_password / user / password / edit. (.: Format) Create / Password # Edit Patch / User / password (.format) devise / passwords # update PUT / User / Password (.: Format) devise / passwords # update devise.rb setup such as ... config.sign_out_via =: Delete Link code from my view & Lt;% = current_user.email% & gt; & Lt; / strong> Logged in as. & Lt;% = link_to 'Edit Profile', edit_user_registration_path ,: class = & gt; 'Nevar-link'% & gt; | & Lt;% = link_to "logout", destroy_user_session_path, method :: delete, class = & gt; 'Nevar-link'% & gt; & lt;% else% & gt; & Lt;% = link_to "Sign up", new_user_registration_path,: class = & gt; 'Nevar-link'% & gt; | & Lt;% = link_to "Login", new_user_session_path ,: class = & gt; 'Nevar-Link'% & gt; & Lt;% end% & gt; Thank you for a time before any of your resources or inputs!
So, as expected that my routes were correct, but my app jquery_ujs . jquery_ujs helps in making the method: Delete the job. To provide the right path for jquery_ujs I added gem 'rails_12factor', group :: output to my jamfile and bundle install Rail 1 2factor helps in stabilizing properties in Bhiroki. Thanks for @ MichaelSzyndel for this helpful resource ...
4 Asset Pipelines Rail on Harko: < / Html>
Comments
Post a Comment