Hiccdown Development Notes
Showing only #325 and its comments.
See full discussionLog in or sign up to participate in this discussion.
With an account, you can revise, criticize, and comment on ideas.Hiccdown methods should live in their own, separate modules. How about they are called ‘displays’?
module ProductsDisplay
def self.index vc, # …
vc.some_helper_method
end
end
A benefit of this approach is that, when people start a new Rails app, they may end up putting whatever they’d otherwise put in a helper in a display, since displays have the benefit of having unambiguously resolvable method names.
Then how would you call index from a helper method?
I don’t think that’s something people would do a lot, but they still easily could: ProductsRenderer.index(self)
Tested, it works. self does indeed point to the view_context in the helper. Verified by printing object_ids.
I’m trying this now. Having to prepend every invocation of a helper method with vc. is getting really old really fast.