Skip to content

Commit

Permalink
Add an index to the foreign key of the translations table. Closes jos…
Browse files Browse the repository at this point in the history
  • Loading branch information
hukl committed Jul 21, 2009
1 parent 2aa2a3a commit a24f438
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/globalize/model/active_record/translated.rb
Expand Up @@ -99,6 +99,10 @@ def create_translation_table!(fields)
end end
t.timestamps t.timestamps
end end

self.connection.add_index(
translation_table_name, "#{self.table_name.singularize}_id"
)
end end


def drop_translation_table! def drop_translation_table!
Expand Down

0 comments on commit a24f438

Please sign in to comment.