Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########Controller#######
- courses_152 = Course.find(:all, :conditions => "section LIKE 'CSC 152%'").collect { |course| course.class_id }
- #I want to somehow sort through the @152pre array but not sure how to do it
- #in ruby?
- #@152pre = Course.find(:all, :conditions => "section LIKE 'CSC 152%'").collect { |course| course.class_id }
- students_152_only = Grade.find(:all, :conditions => {:class_id => courses_152}).collect { |g| g.surrogate_id }
- ######dan2######
- <h1>How did CSC152 Students Compare C++ VS Java</h1>
- <h2>Post Java</h2>
- <table>
- <tr>
- <th>Grade</th><th>Count</th>
- </tr>
- <% for grade in @grades_152_only %>
- <tr>
- <td><%= grade[0] %></td>
- <td><%= grade[1] %></td>
- </tr>
- <% end %>
- </table>
- <h2>Pre java</h2>
Add Comment
Please, Sign In to add comment