Created
October 7, 2011 07:20
-
-
Save justinko/1269680 to your computer and use it in GitHub Desktop.
This file contains 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
module ViewDecorator | |
include RailsViewHelpers | |
def link_to_root | |
link_to # ... | |
end | |
end | |
# Most likely you won't do this because you need to | |
# pass some kind of data/state | |
@non_model_object = Object.new.extend(ViewDecorator) | |
class NonModelObject | |
include ViewDecorator | |
end | |
@non_model_object = NonModelObject.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment