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

Views Challenge

Hola Good People! Going a bit nuts over the 'Views' Code Challenge: "Loop through our statuses array in an ERB template. Assume we have statuses set up as an array and want to print out the name." It then give us : <% @statuses.each do |status| %> Name: <br /> <% end %> I am very much confused with this video and code challenge. Also, the 'Name: <br />' seems irrelevant and was not mentioned at all in the video. Any ideas? Instead of a direct answer, I'd appreciate hints instead-Make my brain work a bit more.:) Cheers folks;) Dan (P.S, Having problems with 'Enter' not working, hence the long-ass'd paragraphs:S)

4 Answers

So after a bit of trial and error, I passed the challenge with the following: <% @statuses.each do |status| %> Name: <%= status.name %> <br /> <% end %>

So am I simply just inserting the value of 'Name:' to make this work? I'm 90% sure:)

Daniel, thanks for the post. You helped me out.

No worries shipmate. I've had to take a step back with this course at the moment. It feels a bit like a 'just copy this' exercise. I think the progression of the Web Developer Track is very good up until this point. The first Ruby Project appears to rise very quickly in it's complexity. I'm still waiting to hear back on whether we should be diving into Ruby Foundations before the first Project. What do you reckon?:)

I agree. I skipped light years ahead of where I am.