I spent some time lurking on the RubyOnRails list and eventually engaged in a couple of conversations. I came away with three important notes:
1) As this was my first publicly announced code released, I realized I should have done this earlier. Great to get feedback.
2) Some simple design changes were made to further DRY up some code from simply reading other posts (not related to Stage). i.e. moved error_messages_for to the form partial.
3) Listening to others challenge the architecture with their own, well thought out ideas, has been nice. Even though I don’t agree with some of the interpretations of design concepts, it was good.
The main goal for this generator is simplicity. I want to get to the HTML as quickly as possible. There obviously has to be some code to format the data as required and I would like to keep that code to a minimum. I also don’t want to “junk up” the controller with presentation (HTML) code. This is why I involved the helpers. In order to minimize code in my _data.html.erb file, I thought of calling one method (defined in the helper) to house the presentation logic.
I think using the helper in this fashion is the correct approach. However, I also think there is probably a better way to do this, so if you have any ideas, please let me know. If you think it’s a completely wrong approach I would also like to hear your ideas.
To those of you who have some code you would like to release but never can seem to find the time, I highly recommend doing so. I think it’s good experience.
