Skip to content

Instantly share code, notes, and snippets.

@bryanp
Created December 16, 2011 01:54
Show Gist options
  • Select an option

  • Save bryanp/1484053 to your computer and use it in GitHub Desktop.

Select an option

Save bryanp/1484053 to your computer and use it in GitHub Desktop.
Proposed Presenter API Changes
# request for "/foo"
presenter.view_path
# => "foo"
presenter.root_path
# => "pakyow.html"
# change the view path
presenter.view_path = "foo/bar"
# change the populated view
presenter.view = View.at_path("foo/bar")
# OR
presenter.view = View.new("pakyow.html").populate("foo/bar")
# present part of a view
presenter.present_with("#main ul > li:first-child")
# change the view path and override root
presenter.view_path = "foo/bar"
presenter.root_path = "another_root.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment