Copycat is a Rails engine that allows editing live website copy using existing i18n view helpers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app remove `attr_accessible` Aug 24, 2015
config refactor routes drawing Apr 4, 2012
db/migrate add locales Mar 20, 2012
lib bump version to 0.2.7 Aug 24, 2015
script rails new plugin copycat --full Mar 13, 2012
.rspec Colorize rspec output May 9, 2014
.rvmrc .rvmrc Mar 13, 2012
Appraisals Setup appraisal gem May 9, 2014
MIT-LICENSE update Gemfile, gemspec, license Mar 13, 2012 formatting edits Apr 8, 2012
Rakefile Setup appraisal gem May 9, 2014


Copycat is a Rails engine that allows users to edit live website copy.

How to use

Add copycat to your Gemfile and run bundle install.

Copycat uses a database table to store the copy items, and so it is necessary to create that:

rake copycat:install
rake db:migrate

Since Copycat data is stored locally on an indexed table with no foreign keys, page loads are very fast and changes appear instantly.

In a view, use the Rails i18n translate method where you would like to display some editable copy:

<h1><%= t('site.index.header') %></h1>

Visit the page in your browser, and a Copycat translation will be created for the key. Then visit /copycat_translations in your browser, log in with the username and password generated in config/initializers/copycat.rb, and you can edit the value of that token.

Rails i18n API

You can read about the Rails internationalization framework here.


To transfer changes from staging to production:

  • Download copy as YAML on staging
  • Login to Copycat on production
  • Upload YAML to production

Since this process requires no code commits, non-developers can also 'deploy' copy changes.

You can also commit Copycat's YAML export, which is compatible with i18n, to your git repository.


The default route to edit copy is '/copycat_translations'. This can be customized in the initializer.

The Copycat routes are configured automatically by the engine, after your Rails application's routes.rb file is run. This means that if your routes include a catchall route at the bottom, the Copycat route will be masked. In this case you can manually draw the Copycat routes prior to the catchall route with the following line in config/routes.rb:

Rails.application.routes.draw do


Because Copycat does a SQL query for each token, it can produce a lot of noise in the log output. Therefore by default the logger is disabled for the Copycat ActiveRecord class. It can be enabled with the environment variable COPYCAT_DEBUG, e.g.



See an example application here.


As a Rails engine, Copycat is developed using a nested dummy Rails app. After cloning the repository and running bundler, the plugin must be installed in the dummy app:

cd spec/dummy
rake copycat:install
rake db:create db:migrate db:test:prepare
cd ../..

Now you can run the test suite:

rspec spec/


Copycat is released under the MIT license. See MIT-LICENSE file.