Dapper

Dapper adds the ability to generate presenters for your rails project.

Installation

Add this line to your application's Gemfile:

gem 'dapper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dapper

Usage

Once the gem is installed, run the presenters generator.

$ rails generate presenter CONTROLLER_NAME [actions]

Example:

$ rails generate presenter Photos index new edit

The result will be:

myrailsproject |~app/ |~presenters/ |~photos/ |-edit_presenter.rb |-index_presenter.rb `-new_presenter.rb

Running the presenter generator without any actions will default to one index_presenter.rb

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request