So I have a Model class like this:
attr_accessible :email, :firstname, :lastname, :phones_attributes
and even validations in that model like this:
validates :firstname, presence: true
Notice all of them are using that ":" symbol before the variable names.
But then in that Model I have a method like this:
def name
[firstname, lastname].join(' ')
end
So how come we didn't need to type those ":" before variable names this time? What's the difference?