From: "David A. Black" Date: 2005-09-04T20:25:40+09:00 Subject: Re: params v.s. @params in rails? Hi -- On Sun, 4 Sep 2005, Barry wrote: > Both work in my controller class, so I am wondering what's the > difference and when should each one be used? To the extent that this is a Rails question, you might want to ask it in a Rails forum (mailing list or IRC channel). Meanwhile, the non-Rails-specific answer is that the bareword "params" is a local variable, while "@params" is an instance variable. Local variables are mainly a kind of "scratchpad" or temporary holding area for data in the current local scope. Instance variables are unique per object, rather than per scope, and give your objects a way to maintain state across different methods and local scopes. David -- David A. Black dblack@wobblini.net