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

Ruby

Code 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
STAFF
Jason Seifer
Treehouse Guest Teacher

Hi Jovani,

Can you possibly paste the error messages you are getting? That will help to troubleshoot the issue. Sorry for the trouble!

Hey Jason,

Thanks for the reply and yeah the error message said this:

Bummer! The status method did not work.

What was the result of this discussion? I'm still getting the same error message. Thanks!

Figured it out... def status model.state.titleize end

it 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...