Do you do this:
class ModelsController < ApplicationController before_filter :find_model def show end def destroy @model.destroy end private def find_model @model = Model.find_by_id(params[:id]) unless @model redirect_to :action => :index flash[:error] = "Invalid model id" return false end end end
in every controller? Gets repetitive doesn’t it?
Read the rest of this entry »