passing parameters between controllers

Hi,

I am trying to pass some parameters from one controller method to a method in a different controller , using the rediret_to method. My code is something like this

controllerA

def method1 id =(params['user_name']) redirect_to({:controller => "controllerB", :action => "method2"}, :user=>id) end

controllerB def method2 user @user=user end

However this doesn't seem to be working , because in view when I use < %= @user%> to display the user name , I get the error : wrong number of arguments (0 for 1)

Any clue , where am going wrong.

TIA ~shishir

Thanks Shai !! It worked :slight_smile:

~shishir