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 Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Viewing Todo Items: Part 2

Chris Buczkowski
Chris Buczkowski
3,939 Points

getting "undefined method" failures - help!

okay, so it turns out I am just a dummy who didn't save all of my work. one of my files hadn't been saved, so when I gave up and closed out of Sublime Text, it prompted me to save, which I did. I thought that was odd, so I tried re-running the test, and now I'm getting the same result as in the course.

I would still like to know, however, how can I cut and paste my code so it appears like it does in my text editor/terminal? (I see a lot of other people have this figured out, and it would make my questions much less ugly, haha!)

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You can paste your code here, then I will format it properly and then you will click "Edit" to see what I did. Then click the "Markdown Cheatsheet" link and see how it works. Then experiment a lot with comments etc. until you see the results you want ;).

Chris Buczkowski
Chris Buczkowski
3,939 Points

wow, so simple... I could've sworn I looked at the Markdown Cheatsheet before, but must have missed the code instructions. just one follow up question... when pasting text from the terminal, should I just be leaving the language designation blank?

    it "displays the title of the todo list" do
        visit_todo_list(todo_list)
        within("h1") do
            expect(page).to have_content(todo_list.title)
        end
    end

many thanks, Maciej!

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You can use 'terminal' keyword and it will make the font color plain white.

Chris Buczkowski
Chris Buczkowski
3,939 Points

thanks Maciej! I actually figured out why I was getting the errors. There was an unsaved file I had open somewhere in the text editor. once I saved everything I was back where I expected to be.

so now I feel like I'm left inundating you with stupid questions about forum functionality. how do I mark a question as answered?

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Don't worry about this :). You can add your own answer (explaining what was wrong) and mark it as the bets one to indicate that this topic is closed.

1 Answer

Chris Buczkowski
Chris Buczkowski
3,939 Points

okay, so it turns out I am just a dummy who didn't save all of my work. one of my files hadn't been saved, so when I gave up and closed out of Sublime Text, it prompted me to save, which I did. I thought that was odd, so I tried re-running the test, and now I'm getting the same result as in the course.

thanks for all the help, Maciej!