Malina
Interface for browsing sent emails.
Installation
Add this line to your application's Gemfile:
gem 'malina', group: :developmentAnd then execute:
$ bundleOr install it yourself as:
$ gem install malina1. Generate initialize file
rails g malina:installit generates malina_emails.rb in your application's folder config/initializers/
ActionMailer::Base.register_interceptor(Malina::EmailInterceptor) if Rails.env.development?
Malina::Config.layout = 'malina'2. Generate migration file
rails g malina:migrationrun migration
rails db:migrate3. Mount route
add this line to your config/routes.rb
mount Malina::Engine => '/backroom/emails', as: :malinayou can change this url of course
Usage
and now interface is available at your's app url, for example localhost:3000/backroom/emails
Views
Since Malina is an engine, all its views are packaged inside the gem. These views will help you get started, but after some time you may want to change them. If this is the case, you just need to invoke the following generator, and it will copy all views to your application:
rails g malina:layoutmakes Layout available for changes
rails g malina:viewsthe other views, too
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mpakus/malina
License
The gem is available as open source under the terms of the MIT License.