How could one get at the session data from within the routing code (config/routes.rb)? I would like to make route mapping contingent upon session data. -pachl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Wed, 2006-11-01 at 01:02 +0000, pachl wrote:> How could one get at the session data from within the routing code > (config/routes.rb)? > > I would like to make route mapping contingent upon session data.---- Why not put <%= debug session %> into your view template to see the values that the current session is dealing with? Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/31/06, Craig White <craigwhite-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> > On Wed, 2006-11-01 at 01:02 +0000, pachl wrote: > > How could one get at the session data from within the routing code > > (config/routes.rb)? > > > > I would like to make route mapping contingent upon session data. > ---- > Why not put <%= debug session %> into your view template to see the > values that the current session is dealing with? > > Craig > > > > >Pachl, Perhaps you could right a routing extension plugin - look at the excellent request_routing plugin here: http://svn.vivabit.net/external/rubylibs/request_routing/ Also Jamis has recently blogged about routing here: http://weblog.jamisbuck.org/2006/10/26/monkey-patching-rails-extending-routes-2 Hope this helps, -- Zack Chandler http://depixelate.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-/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 -~----------~----~----~----~------~----~------~--~---