Last active
December 24, 2015 20:39
-
-
Save burtlo/6859838 to your computer and use it in GitHub Desktop.
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
class MyPresenter < OpenStruct | |
end |
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
class ProjectsController | |
def show | |
end | |
helper_method :presenter | |
def presenter(params={}) | |
MyPresenter.new(params) | |
end | |
end |
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
<h1>Show Page</h1> | |
<%= presenter(title: 'something', object: nil) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment