end
def edit
- @song = Song.find_by_id(params[:id])
+ @song = Song.active.find_by_id(params[:id])
redirect_to songs_path if @song.blank?
end
+
+ def list
+ @songs = Song.active.all
+ end
+
+ def search
+ song_search_form = SongSearchForm.new(params[:search])
+ conditions = song_search_form.conditions
+ @songs = Song.find(:all, conditions)
+ end
end