Permalink
Browse files

allow to set_translation_table_name on client model. use the globaliz…

…e_proxy.table_name instead of evaluating it.
  • Loading branch information...
Clemens Kofler and Sven Fuchs Sven Fuchs
Clemens Kofler and Sven Fuchs authored and Sven Fuchs committed Sep 22, 2009
1 parent 178da3f commit 785e4bcd6743cab15f7850041aecb3ceb4a6ac65
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/globalize/model/active_record/translated.rb
@@ -101,8 +101,12 @@ def create_translation_table!(fields)
self.connection.add_index(translation_table_name, "#{self.table_name.singularize}_id", :name => translation_index_name)
end
+ def set_translation_table_name(table_name)
+ globalize_proxy.set_table_name(table_name)
+ end
+
def translation_table_name
- self.name.underscore.gsub('/', '_') + '_translations'
+ globalize_proxy.table_name
end
def translation_index_name

0 comments on commit 785e4bc

Please sign in to comment.