@session[] or session[]


#1

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?


#2

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


#3

On 3/2/06, Marcel Molina Jr. removed_email_address@domain.invalid wrote:

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

Thanks!

But any explanation as to why @session works?


#4

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

On 3/2/06, Marcel Molina Jr. removed_email_address@domain.invalid 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