Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit a24f43812b9483ab0239832ae30dd97e046235b3 1 parent 2aa2a3a
@hukl hukl authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/globalize/model/active_record/translated.rb
View
4 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!
Please sign in to comment.
Something went wrong with that request. Please try again.