In routes.rb I''ve put: resources :sessions controller is: class SessionsController < ApplicationController def destroy session[:id] = nil session.delete(:casfilteruser) CASClient::Frameworks::Rails::Filter.logout(self) end end In application.html.erb I have: <%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete %> I think it''s all but: No route matches {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} What I''ve missed? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
you dont need to pass this session[:cas_user] On Mon, Sep 13, 2010 at 7:53 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> In routes.rb I''ve put: > > resources :sessions > > controller is: > > class SessionsController < ApplicationController > > def destroy > session[:id] = nil > session.delete(:casfilteruser) > CASClient::Frameworks::Rails::Filter.logout(self) > end > > end > > In application.html.erb I have: > > <%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete > %> > > I think it''s all but: > > No route matches {:action=>"destroy", :controller=>"sessions", > :id=>"name.surname"} > > What I''ve missed? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
the default destroy route is /controller/id , :method=> delete {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} but your destroy action does not need an id really, the other problem is that you dont need an id but pass session_path(session[:cas_user]) and then not use it becuase you do this session[:id] = nil im not user if yo want to do this session[:cas_user] = nil On Mon, Sep 13, 2010 at 9:54 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you dont need to pass this session[:cas_user] > > > > On Mon, Sep 13, 2010 at 7:53 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> In routes.rb I''ve put: >> >> resources :sessions >> >> controller is: >> >> class SessionsController < ApplicationController >> >> def destroy >> session[:id] = nil >> session.delete(:casfilteruser) >> CASClient::Frameworks::Rails::Filter.logout(self) >> end >> >> end >> >> In application.html.erb I have: >> >> <%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete >> %> >> >> I think it''s all but: >> >> No route matches {:action=>"destroy", :controller=>"sessions", >> :id=>"name.surname"} >> >> What I''ve missed? >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> the default destroy route is > /controller/id , :method=> delete > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} > > but your destroy action does not need an id really,So I''ve to change the default destroy route for sessions resource? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Msan Msan wrote:> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> the default destroy route is >> /controller/id�������� , :method=> delete >> {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} >> >> but your destroy action does not need an id really, > > So I''ve to change the default destroy route for sessions resource?Perhaps you should be using a singleton resource for sessions the way Authlogic does? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
i think you should, resources user, :except => :destroy then match you path here On Mon, Sep 13, 2010 at 11:55 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > the default destroy route is > > /controller/id , :method=> delete > > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} > > > > but your destroy action does not need an id really, > > So I''ve to change the default destroy route for sessions resource? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think you are missing the rails javascript file, which is who actually handles the special links. When you click on the link, the method is GET, so you don''t hace any toute related to the action destroy in that method. Daniel Gaytán 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> i think you should, > > resources user, :except => :destroy > then > match you path here > > > On Mon, Sep 13, 2010 at 11:55 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > the default destroy route is >> > /controller/id , :method=> delete >> > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} >> > >> > but your destroy action does not need an id really, >> >> So I''ve to change the default destroy route for sessions resource? >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
@Daniel Gaytán but the default destroy route will still wait for an id, and he doesnt needs if since the user is in the session On Mon, Sep 13, 2010 at 3:38 PM, Daniel Gaytán <daniel.gaytan.news@gmail.com> wrote:> I think you are missing the rails javascript file, which is who actually > handles the special links. > > When you click on the link, the method is GET, so you don''t hace any toute > related to the action destroy in that method. > > Daniel Gaytán > > > > 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> i think you should, >> >> resources user, :except => :destroy >> then >> match you path here >> >> >> On Mon, Sep 13, 2010 at 11:55 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> > the default destroy route is >>> > /controller/id , :method=> delete >>> > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} >>> > >>> > but your destroy action does not need an id really, >>> >>> So I''ve to change the default destroy route for sessions resource? >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Then it may be set as resource instead of resources or maybe resources :something, :except => :destroy do delete :destroy, :on => :collection, :as => :destroy end Daniel Gaytán 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> @Daniel Gaytán > but the default destroy route will still wait for an id, and he doesnt > needs if since the user is in the session > > > > > > On Mon, Sep 13, 2010 at 3:38 PM, Daniel Gaytán < > daniel.gaytan.news-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I think you are missing the rails javascript file, which is who actually >> handles the special links. >> >> When you click on the link, the method is GET, so you don''t hace any toute >> related to the action destroy in that method. >> >> Daniel Gaytán >> >> >> >> 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >>> i think you should, >>> >>> resources user, :except => :destroy >>> then >>> match you path here >>> >>> >>> On Mon, Sep 13, 2010 at 11:55 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> > the default destroy route is >>>> > /controller/id , :method=> delete >>>> > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} >>>> > >>>> > but your destroy action does not need an id really, >>>> >>>> So I''ve to change the default destroy route for sessions resource? >>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
yes i agree On Mon, Sep 13, 2010 at 3:57 PM, Daniel Gaytán <daniel.gaytan.news@gmail.com> wrote:> Then it may be set as resource instead of resources > > or maybe > > resources :something, :except => :destroy do > delete :destroy, :on => :collection, :as => :destroy > end > > Daniel Gaytán > > > 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> @Daniel Gaytán >> but the default destroy route will still wait for an id, and he doesnt >> needs if since the user is in the session >> >> >> >> >> >> On Mon, Sep 13, 2010 at 3:38 PM, Daniel Gaytán < >> daniel.gaytan.news-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> I think you are missing the rails javascript file, which is who actually >>> handles the special links. >>> >>> When you click on the link, the method is GET, so you don''t hace any >>> toute related to the action destroy in that method. >>> >>> Daniel Gaytán >>> >>> >>> >>> 2010/9/13 radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> >>>> i think you should, >>>> >>>> resources user, :except => :destroy >>>> then >>>> match you path here >>>> >>>> >>>> On Mon, Sep 13, 2010 at 11:55 AM, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> >>>>> On 13 September 2010 16:02, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>> > the default destroy route is >>>>> > /controller/id , :method=> delete >>>>> > {:action=>"destroy", :controller=>"sessions", :id=>"name.surname"} >>>>> > >>>>> > but your destroy action does not need an id really, >>>>> >>>>> So I''ve to change the default destroy route for sessions resource? >>>>> >>>>> -- >>>>> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On Mon, Sep 13, 2010 at 3:00 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > yes i agreeThat you don''t know how to trim a post? -- Greg Donald destiney.com | gregdonald.com -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
no, that his is a way to build the route resources :something, :except => :destroy do delete :destroy, :on => :collection, :as => :destroy end On Mon, Sep 13, 2010 at 4:03 PM, Greg Donald <gdonald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Sep 13, 2010 at 3:00 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > yes i agree > > That you don''t know how to trim a post? > > > -- > Greg Donald > destiney.com | gregdonald.com > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 September 2010 21:57, Daniel Gaytán <daniel.gaytan.news-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Then it may be set as resource instead of resources > > or maybe > > resources :something, :except => :destroy do > delete :destroy, :on => :collection, :as => :destroy > endIf I do resources :sessions, :except => :destroy do delete :destroy, :on => :collection, :as => :destroy end Then It call update instead of destroy: <%= link_to ''Logout'', session_path, :method => :delete %> No route matches {:action=>"update", :controller=>"sessions"} -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On 14 September 2010 09:14, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 13 September 2010 21:57, Daniel Gaytán <daniel.gaytan.news-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> >> Then it may be set as resource instead of resources >> >> or maybe >> >> resources :something, :except => :destroy do >> delete :destroy, :on => :collection, :as => :destroy >> end > > If I do > resources :sessions, :except => :destroy do > delete :destroy, :on => :collection, :as => :destroy > end > Then It call update instead of destroy: > <%= link_to ''Logout'', session_path, :method => :delete %> > > No route matches {:action=>"update", :controller=>"sessions"}I think I''ve solved using resource :session. Thanks to all. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.