Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialvictor manda
Courses Plus Student 2,479 PointsWont tell me why its not working?
I'm I missing something as it looks good to me
contact_list = []
contact = {"name" => "", "phone_number" => "" }
contact["name"].push(get_name)
3 Answers
Steve Hunter
57,712 PointsAt the moment, the name
attribute has an empty string assigned to it. 'name' => ""
.
Instead of that, the challenge wants you to use the get_name
method so that the 'name'
attribute holds what that method returns.
So, instead of 'name' => ""
change this to 'name' => get_name
. This means that 'name'
willl now hold whatever is returned by the method, get_name
.
Make sense?
Steve.
Steve Hunter
57,712 PointsHi Victor,
I just posted in your other thread about this challenge.
You want to replace the assignment of the empty string, ""
, with the call to the get_name
method. So, delete the ""
and replace with get_name
.
Steve.
victor manda
Courses Plus Student 2,479 Pointsstill not following mate
victor manda
Courses Plus Student 2,479 PointsStill not following mate...
victor manda
Courses Plus Student 2,479 Pointsvictor manda
Courses Plus Student 2,479 PointsI did that only I had "get_name", thank you for clarifying it!
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsAh, yes. The method name doesn't require the
""
surrounding it. Just call it directly as-is.