Ok, simplistic question.
There's this method in User model:
def name_email
"#{first_name} #{last_name} - #{email}"
end
All right, by the virtue of the fact that it doesn't have self attached to the method, one can deduct that it's an instance method, right?
So, I crack open the console, and try to initialize it like this:
LaLaLa = User.new
Then I try to set this method by setting the first name first like this:
Jesse = LaLaLa.first_name
which gets me this:
=> nil
Then I try to set the last name:
Smith = LaLaLa.last_name
which gets me this again:
=> nil
Then I try to set email:
FakeEmail = LaLaLa.email
which gets me this:
=> ""
Then I try to have the first name, last name and email by calling the method like this:
LaLaLa.name_email
which gets me this:
=> " - "
Which brings me to my question, why is this not working in the console? And what am I doing wrong here?
I mean, I set the first name, last name, and email as you can see.
Why doesn't the method display the results?
Let me know if this question could be phrased better.