Hi guys. I''m trying to get rid of some non-existing routes. My UserSessionsController has three methods: new, create, and destroy. However, in routes.rb , I''m generating the 7 RESTful routes: map.resource :user_session So, I thought that this would generate routes for the 3 actions that do exist: map.resource :user_session, :only => [:new, :create, :destroy] However, after adding that, ``rake routes'''' still spits out the other 4 routes: http://rafb.net/p/kRS3DD41.html Any idea what''s going on here? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ 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 For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Nick, The :except and :only routing options are only available on Edge Rails (Rails 2.2.1 or Rails 2.2 RC2) at this time. Make sure you are running the correct version. Cheers -- Robert Zotter Zapient, LLC Ruby on Rails Development and Consulting http://www.zapient.com http://www.fromjavatoruby.com On Nov 15, 2:08 pm, Nick <n...-qGbiljoI0DQkmLvzuZlaBw@public.gmane.org> wrote:> Hi guys. I''m trying to get rid of some non-existing routes. My > UserSessionsController has three methods: new, create, and destroy. > However, in routes.rb , I''m generating the 7 RESTful routes: > map.resource :user_session > > So, I thought that this would generate routes for the 3 actions that > do exist: > map.resource :user_session, :only => [:new, :create, :destroy] > > However, after adding that, ``rake routes'''' still spits out the other > 4 routes: > http://rafb.net/p/kRS3DD41.html > > Any idea what''s going on here? Thanks, > Nick--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 15, 5:47 pm, Robert Zotter <rzot...-pPleKHUOxhtBDgjK7y7TUQ@public.gmane.org> wrote:> Nick, > > The :except and :only routing options are only available on Edge Rails > (Rails 2.2.1 or Rails 2.2 RC2) at this time. Make sure you are running > the correct version. > > Cheers > > -- > Robert Zotter > Zapient, LLC > Ruby on Rails Development and Consulting > > http://www.zapient.comhttp://www.fromjavatoruby.comThanks Robert. I had no idea that was the case. I figured that the docs at api.rubyonrails.org were applicable to the current stable version, rather than Edge. -Nick --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 15, 10:35 pm, Nick <n...-qGbiljoI0DQkmLvzuZlaBw@public.gmane.org> wrote:> Thanks Robert. I had no idea that was the case. I figured that the > docs at api.rubyonrails.org were applicable to the current stable > version, rather than Edge. > -NickAck, my bad. The :except and :only options aren''t listed on api.rubyonrails.org yet. I found them in the "Rails Routing From The Inside Out" Rails Guide: http://guides.rubyonrails.org/routing_outside_in.html --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---