Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Forked from botanicus/README.textile
Created February 14, 2010 08:19
Show Gist options
  • Save reactormonk/303907 to your computer and use it in GitHub Desktop.
Save reactormonk/303907 to your computer and use it in GitHub Desktop.
class Posts < Rango::Controller
include Rango::ExplicitRendering
def show
post = Post.get(params[:id])
render "post.html", post: post
end
end
class Posts < Rango::Controller
include Rango::ExplicitRendering
self.context ||= Object.new
def show
# you can't use @post explicitly
post = Post.get(params[:id])
render "post.html", post: post
end
end
class Posts < Rango::Controller
include Rango::ImplicitRendering
def show
@post = Post.get(params[:id])
render "post.html"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment