Permalink
Browse files

Add an index to the foreign key of the translations table. Closes #4

  • Loading branch information...
1 parent 2aa2a3a commit a24f43812b9483ab0239832ae30dd97e046235b3 @hukl hukl committed Jul 21, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/globalize/model/active_record/translated.rb
@@ -99,6 +99,10 @@ def create_translation_table!(fields)
end
t.timestamps
end
+
+ self.connection.add_index(
+ translation_table_name, "#{self.table_name.singularize}_id"
+ )
end
def drop_translation_table!

0 comments on commit a24f438

Please sign in to comment.