Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 785e4bcd6743cab15f7850041aecb3ceb4a6ac65 1 parent 178da3f
Clemens Kofler and Sven Fuchs authored svenfuchs committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/globalize/model/active_record/translated.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.