Editable Rails email templates
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db/migrate
lib
script
spec
.gitignore
Gemfile
Gemfile.lock
Guardfile
MIT-LICENSE
README.md
Rakefile
customailer.gemspec

README.md

Customailer

Code Climate

Let your mail templates to be edited on the fly.
Rails 3 only.

Installation

As usual, add customailer to your Gemfile, install and run migrations:

gem "customailer", github: "RKushnir/customailer"

bundle install
rake customailer:install:migrations
rake db:migrate

Usage

Rails will start to look up your custom templates automatically as soon as you install the gem. To actually create them you'll need to mount it in the router:

mount Customailer::Engine => "/customailer"

Customailer doesn't know about your security, so you'll need to take care of that. Here's how I use it with Devise:

authenticate :user, lambda(&:admin?) do
  mount Customailer::Engine => "/customailer"
end

Now you can create and edit the mail templates at /customailer/mail_templates. Customailer uses Liquid template engine.

Credits

Thanks to José Valim for his great book Crafting Rails Applications and to Roy van der Meij for the code for Liquid template handler.

License

This project rocks and uses MIT-LICENSE.