I am trying to use the new Rails 2.0 macro : rescue_from
class PostsController < ApplicationController
rescue_from ActiveRecord::RecordNotFound, :with => :deny_access
…
def show
@post = Post.find_by_id(params[:id])
raise ActiveRecord::RecordNotFound if @post.nil? #illegal access
…
end
def deny_access
respond_to do |format|
format.html
end
end
but the exception is not raised … did I miss something ?
thanks
kad