On Sep 6, 2014, at 5:50, Arup Rakshit <aruprakshit / rocketmail.com> wrote:
>
>  def current_user
>    @_current_user ||= session[:current_user_id] &&

> http://guides.rubyonrails.org/action_controller_overview.html#accessing-the-session
>
> What is the significance of the leading trailing underscores with instance
> variable names ?

In this case, it's to signal that `@_current_user` is an
implementation detail, and shouldn't be used directly (i.e. only
through the `current_user` method).

In other cases, I've seen it used to indicate that a variable is
extracted from arguments or an array or structure, but never used.
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGNzCCBjMw
ggUboAMCAQICAwmqkTANBgkqhkiG9w0BAQsFADCBjDELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0
YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcx
ODA2BgNVBAMTL1N0YXJ0Q29tIENsYXNzIDEgUHJpbWFyeSBJbnRlcm1lZGlhdGUgQ2xpZW50IENB
MB4XDTE0MDQxNjE3NTUxNVoXDTE1MDQxODAyMTgxN1owSjEgMB4GA1UEAwwXYmtlcmxleUBicnlj
ZWtlcmxleS5uZXQxJjAkBgkqhkiG9w0BCQEWF2JrZXJsZXlAYnJ5Y2VrZXJsZXkubmV0MIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzKvhmg7adKOMj0CARHuoWTcl0qL0J2reGY+Ic8p5
rlFHDdOKJEApxULIcW56NmCBA5PTj3G2vT52mcs4fq1KbZZVgtizb/G3PNvdcqJ2lSxIh1Hfkbz7
PL50CTJF+JZO8ewFNrXzcZfnZzyUgf79JkyjVlVUookTJLaEbb9y0hpomJTBbdA1bZqU4XiYo0Gp
trpCsVQVEa2qtyMdpDHuVtM6Tp54wNlFk716AXaYi0wVUffjokqcmVq88HJBmuZp4FUGxoNAwjB/
RR0XjlX1INSZB6KR2cKsBMfVrWVFB6NeLcKHT3JG/mmiYGVJW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