I am studying the source code for fat free CRM. I am trying to understand what this specific line of code in one of the app helpers does:
options[:selected] = (@account && @account.id) || 0
It seems to be setting the value of the options hash with key :selected
to the value of the instance variable @account
or 0
(if @account
doesn't exist).
What is the && @account.id
doing?