-
Presenter Pattern and rails: my workflow, gemified
In the Presenter Pattern, Rails 3 and html_safe I made a promise:
I need to spend some time and talk more about my structure for Presenters, but that’s fodder for another article.
Today I started a new Rails app for a client, and wanted to pull in my work with presenters. So, the answer was either copy and paste all my code into this new app, or write a gem.
So, gem it was: delegate_presenter.
Do two things to get this into your project:
- Add it to your Gemfile
- Add an autoload path in
config/application.rbfor yourapp/presenters/folder.
The Github page for delegate_presenter explains all this in much more detail