It's very simple, I want to handle a normal [show] request with a call to DataMapper like I did in Merb.
With ActiveRecord I could have done this:
class PostsController
def show
@post = Post.get(params[:id])
@comments = @post.comments unless @post.nil?
end
end
and it handles the 404 by catching the resource's exceptions.
DataMapper instead doesn't do this automatically so right now I'm solving it with this solution: [moved in the answers]
It is possible to tell the controller to halt inside the not_found function?