summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/generators
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-02-07 15:50:40 +0100
committerhukl <hukl@eight.local>2009-02-07 15:50:40 +0100
commit36a2f1f3c085dd81171cf7d8220770d4ff921ab3 (patch)
tree5ded15331b192bf428af4c94d46d1abb28ef0690 /vendor/plugins/globalize2/generators
parentce9645d0092d42c7bf8781378181ffbd4ff3d088 (diff)
added globalize2 plugin as well as some modifications
which use the new translation facilities. backend mostly.
Diffstat (limited to 'vendor/plugins/globalize2/generators')
-rw-r--r--vendor/plugins/globalize2/generators/db_backend.rb0
-rw-r--r--vendor/plugins/globalize2/generators/templates/db_backend_migration.rb25
2 files changed, 25 insertions, 0 deletions
diff --git a/vendor/plugins/globalize2/generators/db_backend.rb b/vendor/plugins/globalize2/generators/db_backend.rb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vendor/plugins/globalize2/generators/db_backend.rb
diff --git a/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb b/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb
new file mode 100644
index 0000000..d4513a5
--- /dev/null
+++ b/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb
@@ -0,0 +1,25 @@
1class ActsAsTaggableMigration < ActiveRecord::Migration
2 def self.up
3 create_table :globalize_translations do |t|
4 t.string :locale, :null => false
5 t.string :key, :null => false
6 t.string :translation
7 t.timestamps
8 end
9
10# TODO: FINISH DOING MIGRATION -- stopped in the middle
11
12 create_table :globalize_translations_map do |t|
13 t.string :key, :null => false
14 t.integer :translation_id, :null => false
15 end
16
17 add_index :taggings, :tag_id
18 add_index :taggings, [:taggable_id, :taggable_type]
19 end
20
21 def self.down
22 drop_table :globalize_translations
23 drop_table :tags
24 end
25end