Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a setup task that does all the legwork of getting Tolk running in…

… your app
  • Loading branch information...
commit 77d0ed33779aba34b92ccf3af78311539aff924c 1 parent 18fb33c
@dhh dhh authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/tasks/tolk_tasks.rake
View
9 lib/tasks/tolk_tasks.rake
@@ -1,4 +1,13 @@
namespace :tolk do
+ desc "Add database tables, copy over the assets, and import existing translations"
+ task :setup => :environment do
+ Rake::Task['tolk:import_assets'].invoke
+ system("rails generate tolk_migration")
+ Rake::Task['db:migrate'].invoke
+ Rake::Task['tolk:sync'].invoke
+ Rake::Task['tolk:import'].invoke
+ end
+
desc "Sync Tolk with the default locale's yml file"
task :sync => :environment do
Tolk::Locale.sync!
Please sign in to comment.
Something went wrong with that request. Please try again.