Method: SubjectsController#destroy

Defined in:
app/controllers/subjects_controller.rb

#destroyObject

DELETE /subjects/1 DELETE /subjects/1.json



177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'app/controllers/subjects_controller.rb', line 177

def destroy
  if @work
    @subject = @work.subjects.find(params[:id])
  #else
  #  @subject = Subject.find(params[:id])
  end
  @subject.destroy

  respond_to do |format|
    format.html { redirect_to subjects_url }
    format.json { head :no_content }
  end
end