Displaying 1 result from an estimated 1 matches for "tracks_by_mood".
Did you mean:
track_by_mood
2006 Feb 22
8
filtering "tags" via checkboxes - HABTM
...error that might helpful.
Parameters: {"commit"=>"Show Tracks", "moods"=>["1", "2"]}
MOODS_CONTROLLER.RB
def results
params[:moods].each do
#@my_id=mood
end
mood = Mood.find(4) # hard coded for a single query.
@tracks_by_mood = mood.tracks
end
LIST.RHTML
<h1>Moods</h1>
<p>Select a mood or moods below to see a list of track with those
moods</p>
<ul>
<%= start_form_tag :action => ''results'', :id => @mood %>
<% Mood.find(:all).each do |mood| %>
<l...