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 trial
Jovani Perez
4,710 PointsCode Challenge help?: Using AJAX
Hey guys I'm stuck in a code challenge where it is saying to Add a method called status which calls the state of the model. so far my code looks like this
class UserFriendshipDecorator < Draper::Decorator
decorates :user_friendship
def status
end
end
but when I check my work it says the status method did not work...
I've also tried to do what the video did but instead of friendship I replaced it with status any input would be appreciated thanks!
5 Answers
Jason Seifer
Treehouse Guest TeacherHi Jovani,
Can you possibly paste the error messages you are getting? That will help to troubleshoot the issue. Sorry for the trouble!
Jovani Perez
4,710 PointsHey Jason,
Thanks for the reply and yeah the error message said this:
Bummer! The status method did not work.
Dean Phillips
22,260 PointsWhat was the result of this discussion? I'm still getting the same error message. Thanks!
Dean Phillips
22,260 PointsFigured it out... def status model.state.titleize end
Matius Kristyanto Mulyono
1,855 Pointsit keeps says Bummer! The status method did not work. i already put
def friendship_state model.state.titleize end
def friendship_state model.state end
def state model.state.titleize end
def state model.state end
nothing's correct...