Today the delegation of methods from the CMS helper to other articles helpers is very confusing. Take a look at the methods options_for_article (CmsHelper
), helper_for_article (ApplicationHelper
) and custom_options_for_article from some article helper (BlogHelper
, for example).
This logic must be revised.
For example, it should be easy for a ForumPost
to change the option label from "Not receive comments" to "Close this topic" by just redefining the method custom_options_for_article in ForumPostHelper
(assuming that the ForumPost
class exists, obviously).
- 15 Dec 2010
actually that is not what I meant with refactoring that logic … I think that the decision about which options are available while editing a content should be done by the content class itself, not a helper. And specifically the creation of that instance in CmsHelper
- 16 Dec 2010