Created
December 16, 2011 01:54
-
-
Save bryanp/1484053 to your computer and use it in GitHub Desktop.
Proposed Presenter API Changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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