On 14-09-06, 1:49, Arup Rakshit wrote:
> link :
> http://guides.rubyonrails.org/action_controller_overview.html#accessing-the-session
>
> What is the significance of the leading trailing underscores with instance
> variable names ?

ActionController takes all assigned instance variables (in web action 
methods, defined in subclasses) and exposes them to the view context.

The underscore is there to signal that this variable is not meant to be 
accessed outside the controller context. I think it would still be 
accessible in the view, but you'd have to knowingly use the underscore: 
it's a signal that you shouldn't.

Andrew Vit