| Class | ChordNotesController |
| In: |
app/controllers/chord_notes_controller.rb
|
| Parent: | JazzController |
GET /chord/Cmaj7/notes GET /chord/Cmaj7/notes.xml GET /chord/Cmaj7/notes.js
# File app/controllers/chord_notes_controller.rb, line 13
13: def index
14: respond_to do |format|
15: format.html
16: format.xml { render :xml => @chord_notes.to_xml }
17: format.js { render :text => @chord_notes.to_json }
18: end
19: end
GET /chord/Cmaj7/notes/1 (Where 1 is position in chord) GET /chord/Cmaj7/notes/1.xml GET /chord/Cmaj7/notes/1.js
# File app/controllers/chord_notes_controller.rb, line 24
24: def show
25: respond_to do |format|
26: format.html
27: format.xml { render :xml => '<note>' + @chord_note + '</note>' }
28: format.js { render :text => @chord_note }
29: end
30: end
# File app/controllers/chord_notes_controller.rb, line 46
46: def find_chord
47: @chord = Chord[params[:chord_id]]
48: end
# File app/controllers/chord_notes_controller.rb, line 40
40: def find_chord_note
41: find_chord
42: find_chord_notes
43: @chord_note = @chord.notes[params[:id].to_i + 1]
44: end