@session[] or session[]

Which is more appropriate? @session[] or session[]? Both seem to work.
Is there a difference between which should be used in the controller
vs. the view?

On Thu, Mar 02, 2006 at 03:01:49PM -0500, Justin B. wrote:

Which is more appropriate? @session[] or session[]? Both seem to work.
Is there a difference between which should be used in the controller
vs. the view?

session should be used exclusively. Same goes for params, controller,
etc.

marcel

On 3/2/06, Marcel Molina Jr. [email protected] wrote:

session should be used exclusively. Same goes for params, controller, etc.

Thanks!

But any explanation as to why @session works?

On Thu, Mar 02, 2006 at 03:35:15PM -0500, Justin B. wrote:

On 3/2/06, Marcel Molina Jr. [email protected] wrote:

session should be used exclusively. Same goes for params, controller, etc.

Thanks!

But any explanation as to why @session works?

Currently we have methods that just wrap instance variables. But, in the
future, there is no telling whether the underlying implementation will
change. By always using the method, we can easily change the
implementation
without changing the API.

marcel