Updated comments, added before_destroy where applicable
This commit is contained in:
@@ -43,7 +43,6 @@ class IngredientsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
# FIXME: don't destroy if any meal depend on ingredient
|
||||
if @ingredient.destroy
|
||||
flash[:notice] = 'Deleted ingredient'
|
||||
end
|
||||
|
||||
@@ -39,7 +39,6 @@ class MeasurementsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
# FIXME: don't destroy if there are any readout values
|
||||
if @measurement.destroy
|
||||
flash[:notice] = 'Deleted measurement'
|
||||
end
|
||||
|
||||
@@ -22,7 +22,6 @@ class SourcesController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
# FIXME: do not destroy if anything depends on it
|
||||
if @source.destroy
|
||||
flash[:notice] = 'Deleted source'
|
||||
end
|
||||
|
||||
@@ -22,7 +22,6 @@ class UnitsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
# FIXME: do not destroy if anything depends on it
|
||||
if @unit.destroy
|
||||
flash[:notice] = 'Deleted unit'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user