turingschool / lesson_plans

Lesson Plans for the Turing School of Software & Design
135 stars 395 forks source link

Update mix master #244

Closed s-espinosa closed 8 years ago

s-espinosa commented 8 years ago

@Carmer @case-eee

Here are my initial updates to Mix Master. A couple of quick notes:

Thanks!

case-eee commented 8 years ago

In part 4, we have the following:

<h1>New Playlist</h1>

<%= form_for(@playlist) do |f| %>
    <%= f.text_field :name %>

    <% Song.all.each do |song| %>
        <div>
        <%= check_box_tag :song_ids, song.id, false, :name => 'playlist[song_ids][]', id: "song-#{song.id}" %>
        <%= song.title %>
        </div>
    <% end %>

    <%= f.submit %>
<% end %>

Could we have a RED/GREEN/REFACTOR piece in here where we refactor this database query out of our views? This might actually happen in part 5, but it might be nice to keep it all in one section?

Other than that, I think this is awesome. Thanks @s-espinosa for adding some clarification to this tutorial 🎉

As far as the other info I have from 1605 - it's on my personal laptop (which is at home). I knew I wanted to bring something else with me today.. I'll take a look at it when I get home today and see if there is anything we can update for tomorrow.

As far as moving iteration 6 and 7 to a future point in the module, I'm definitely open to discussing this 👍

s-espinosa commented 8 years ago

@case-eee I like the idea of getting the class call out of the view, but now I'm wondering if we should just not do it that way in the first place? I.e. should we never show it in the tutorial using Song.all, and only show a version that passes @songs = Song.all from the controller?

Also, let me know if that's what you were thinking for a refactor or if you had something else in mind. I should be able to make this change pretty quickly either way.

Thanks for taking a look!

case-eee commented 8 years ago

yup, i like that!

case-eee commented 8 years ago

👍