* Inflections für Thema/Themen etc.
  * Korrigierte Views
This commit is contained in:
HausdorffHimself
2013-08-06 02:06:48 +02:00
parent b560940a70
commit 3be95d2ede
16 changed files with 167 additions and 21 deletions

View File

@@ -0,0 +1,7 @@
class AddIdToThemen < ActiveRecord::Migration
def change
add_column :themen, :themengruppe_id, :integer
add_column :attachments, :thema_id, :integer
add_column :fragen, :thema_id, :integer
end
end

View File

@@ -0,0 +1,7 @@
class AddIdToThemen < ActiveRecord::Migration
def change
add_column :themen, :themengruppe_id, :integer
add_column :attachments, :thema_id, :integer
add_column :fragen, :thema_id, :integer
end
end

View File

@@ -0,0 +1,38 @@
class TranslateThemen < ActiveRecord::Migration
def up
Thema.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :thema_translations, :themen_id, :integer
remove_column :thema_translations, :thema_id
Themengruppe.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :themengruppe_translations, :themengruppen_id, :integer
remove_column :themengruppe_translations, :themengruppe_id
Frage.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :frage_translations, :fragen_id, :integer
remove_column :frage_translations, :frage_id
end
def down
Thema.drop_translation_table! #:migrate_data => true
Themengruppe.drop_translation_table! #:migrate_data => true
Frage.drop_translation_table! #:migrate_data => true
end
end

View File

@@ -0,0 +1,38 @@
class TranslateThemen < ActiveRecord::Migration
def up
Thema.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :thema_translations, :themen_id, :integer
remove_column :themagruppe_translations, :thema_id
Themengruppe.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :themengruppe_translations, :themengruppen_id, :integer
remove_column :themengruppe_translations, :themengruppe_id
Frage.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
})
add_column :frage_translations, :fragen_id, :integer
remove_column :frage_translations, :frage_id
end
def down
Thema.drop_translation_table! #:migrate_data => true
Themengruppe.drop_translation_table! #:migrate_data => true
Frage.drop_translation_table! #:migrate_data => true
end
end