Skip to content

Instantly share code, notes, and snippets.

@botanicus
Created December 1, 2009 15:34
Show Gist options
  • Save botanicus/246372 to your computer and use it in GitHub Desktop.
Save botanicus/246372 to your computer and use it in GitHub Desktop.
class Posts < Rango::Controller
def show
post = Post.get(params[:id])
render "post.html", post: post
end
end
class Posts < Rango::Controller
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
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