If I generate a scaffold I get the standard actions index, new, show, create …. all of which contain a line e.g. like
@comment = Comment.find(params[:id])
Does it make sense to put this line in a seperate method into the controller like
def load
@comment = Comment.find(params[:id])
end
Is this an advantage? Thx for your time
Yes to the separate method, and also yes to using a before_filter.