Skip to content

Commit

Permalink
no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Nov 22, 2012
1 parent 0b08f22 commit b20b5de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/controllers/audio_events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ def by_audio_id

# HACK: inefficient

@audio_recording = (AudioRecording.find_by_uuid id)
@audio_events = AudioEvent.find_all_by_audio_recording_id @audio_recording.id
#@audio_recording = (AudioRecording.find_by_uuid id)
#@audio_events = AudioEvent.find_all_by_audio_recording_id @audio_recording.id

@audio_events =
(AudioRecording)
.select([:id, :uuid])
.joins(:@audio_events)
.where(:audio_recordings => {:uuid => id})

respond_to do |format|
format.json { render json: @audio_events}
Expand Down

0 comments on commit b20b5de

Please sign in to comment.