Bummer! You must be logged in to access this page.

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 Editing Todo Items

Chris Buczkowski
Chris Buczkowski
3,939 Points

"...so I'm just gonna go ahead and copy and paste it in here..." from where???

around 6:20, he "just goes ahead and copies and pastes it in there". but unless I'm completely missing it (which is totally possible), he gives no indication whatsoever where he's copying the code from. you see his mouse flick off screen for a second, only to magically return with the needed code in tow.

so naturally, I'm left to try to find the code (I couldn't), and then type out the whole, rather large chunk of code manually, and correct the inevitable syntax errors that occur when you still don't understand quite what's going on (since it's not really being explained very well).

in case anyone else might find it helpful, here's the code, after I manually typed it all:

  def update
    @todo_list = TodoList.find(params[:todo_list_id])
    @todo_item = @todo_list.todo_items.find(params[:id])
    if @todo_item.update_attributes(todo_item_params)
      flash[:success] = "Saved todo list item."
      redirect_to todo_list_todo_items_path
    else
      flash[:error] = "That todo item could not be saved."
      render action: :edit
    end
  end

wait, maybe Mr. Siefer has a time machine and he was waiting for me to type that out before he could actually copy and paste it, FROM THE FUTURE.

anyway, this module is really kind of infuriating. every other module I've completed has been structured extremely well so that everything was built on the foundation of something before, put into context, and in a way that made sense. this whole module seems like it was just hacked together in an afternoon. (pun?) this module should probably be at least twice as long, so our understanding could be built up as well as it usually is here on Treehouse.

sorry... </rant>

hope that may at least help someone else from wanting to smash their face into their keyboard.

David Richied
David Richied
18,057 Points

I totally agree. In fact, I'm surprised they haven't taken down this course and replaced it, yet.

7 Answers

Im going to write too because its true, he is just copying and pasting from anywhere without saying the changes and the important things, i had to figured out how it works, and it took me hours.

Thank you!! I thought I was crazy or something he did not mention copying that code at all or where he got it from. Really disappointing the lack of explaining things and the horrible editing in this module.

Please give explanations or an overview of whats going on/trying to accomplish and PLEASE give pauses after long lines of code before switching screens to the terminal or other files..

Do you guys even watch these videos after editing????

Chris Buczkowski
Chris Buczkowski
3,939 Points

hang in there, man! that module is really a tough slog for us beginners, but it does get better. the next couple of modules in the track are excellent, and provide much more (necessary) context. I'm in the MVC section now, learning about ActiveRecord, and you can look forward to quite a few "aha" moments. :)

Carlos Reyes
Carlos Reyes
30,056 Points

ty Chris, for the code. I totally agree with you in your first comment. It's good to read that the next modules will make us forget about this one.

Christian Espinoza
Christian Espinoza
4,163 Points

This section has been the worst! just a bunch of copying and pasting with NO time to stop and see what it is were doing(or why). Maybe on a second go through I can just pay attention to the concepts of what he is teaching but now I'm just laser focused on not missing anything since he just pulls code out of his @$$ at times.

Theodore Lano
Theodore Lano
1,817 Points

I'm very relieved to see I wasn't the only one frustrated with this module, particularly this part of it. Thanks for pasting the code, and thanks for reassuring us that it does get better!

1codechic
1codechic
9,399 Points

I had the feeling I wasn't the only one who felt this way. This has been a challenging module just keeping up with him. By the time I type something he has ran his test and on to the next.. I have paused him so much. But I am going to press forward and learn what I can. I hope to see light at the end of the tunnel Hang in there everyone.

Same feedback here. I found that todo_lists_controller.rb also has update method:

def update
    respond_to do |format|
      if @todo_list.update(todo_list_params)
        format.html { redirect_to @todo_list, notice: 'Todo list was successfully updated.' }
        format.json { render :show, status: :ok, location: @todo_list }
      else
        format.html { render :edit }
        format.json { render json: @todo_list.errors, status: :unprocessable_entity }
      end
    end
  end

So I copied it from there and then only changed a few things to match the method in the video (at least didn't have to type it all out), but the lack of explanation where it's coming from and how it works and why (here and in the rest of the course) is very frustrating. This is my first Ruby on Rails course and first one at Treehouse and I'm frankly wondering why I'm paying money to copy-paste without any conceptual understanding of what I'm doing.