[Rails] Re: devise users/sign_out not working
For the sign_out url you should have DELETE method.
If you run 'rake routes' inside your project path, you could see this
route, and there is no GET /users/sign_out at all, only DELETE /users/
sign_out.
So you should use some mechanisme to make <%= link_to "Sign out",
destroy_user_session %> = <a href="/users/sign_out"
data_method="delete">Sign out</a>. One of the way is to use JQuery gem
and make sure you have all javascript enabled.
On Sep 18, 10:17 am, Neha Sinha <neha.si...@west.cmu.edu> wrote:
> Hi,
>
> I too am facing the same problem.
> Im not using JQuery (not that I know of, since I havent installed it)
>
> Any suggestions to overcome this error?
>
> On Aug 6, 5:52 am, Nahuel Garbezza <n.garbe...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Sayuj,
>
> > Are you using JQuery? In that case, you can try "rails g
> > jquery:install". I had the same problem a few days ago. It's an issue
> > related to DELETE actions.
>
> > On 6 ago, 06:28, Sayuj Othayoth <sayujothay...@gmail.com> wrote:
>
> > > Hi comrades,
>
> > > I'm usingdevisesign_in and sign_up urls are workin
>
> > > but, when I try the url:http://localhost:3000/users/sign_out
>
> > > it generates routing error
>
> > > No route matches [GET] "/users/sign_out"
>
> > > How can I fix this?
>
> > > Thank you,
>
> > > Sayuj Othayoth
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home