Setting variable via url

Hi all,

One of my routes looks like this: map.connect

The :blog should actualy become a session variable (indication who’s
blog it is). eg url: Custom Application Development Software for Business - I want to set a
session variable to ‘railsblog’. Is this possible? If yes, how do I do

Thanks in advance

In your example, params[:blog] has the value ‘railsblog’, so you
could do session[:blog] = params[:blog] to set a session variable
with that value.

Building an e-commerce site with Rails?

Meet up at RailsConf:

With every request I should set that blog parameter to the session
variable. I tried to add session[:blog] = params[:blog] in the
ApplicationController but this doesn’t work (‘We’re sorry, but
something went wrong.’). Isn’t the AppliationController always called
and isn’t it thus the perfect place to set that session variable?

Thanks in advance