Open botanicus opened 14 years ago
quiet do DataMapper::ObjectNotFoundError = Class.new(NotFound) end
So you rather than:
def show(id) post = Post.get(id) raise NotFound unless post render "post.html", post: post end
use just:
def show(id) render "post.html", post: Post.get!(id) end
Where should I put it? Generate it to the beginning of models? Somewhere to lib/rango/orm?
lib/rango/orm
So you rather than:
use just:
Where should I put it? Generate it to the beginning of models? Somewhere to
lib/rango/orm
?