public
Fork of ozataman/globalize
Description: Globalize is a Ruby on Rails plugin designed to support multilingual applications (official repository).
Homepage: http://www.globalize-rails.org
Clone URL: git://github.com/rotuka/globalize.git
Search Repo:
Model translations are kept in a separate globalize_model_translations 
table.
ozataman (author)
Sun Jun 22 17:05:16 -0700 2008
commit  a80cccab4275c3db4135ae915fe479788d27f191
tree    7a04f7956d854d785a25d03fc77f13934087f233
parent  bf89ce477c2b326f7c44e22e5778128c9036f886
...
840
841
842
843
 
844
845
846
...
877
878
879
880
 
881
882
883
...
840
841
842
 
843
844
845
846
...
877
878
879
 
880
881
882
883
0
@@ -840,7 +840,7 @@ module Globalize # :nodoc:
0
 
0
               select_clause << ", COALESCE(#{facet_table_alias}.text, #{table_name}.#{facet}) AS #{facet}, "
0
               select_clause << " #{facet_table_alias}.text AS #{facet}_not_base "
0
- joins_clause << " LEFT OUTER JOIN globalize_translations AS #{facet_table_alias} " +
0
+ joins_clause << " LEFT OUTER JOIN globalize_model_translations AS #{facet_table_alias} " +
0
                 "ON #{facet_table_alias}.table_name = ? " +
0
                 "AND #{table_name}.#{primary_key} = #{facet_table_alias}.item_id " +
0
                 "AND #{facet_table_alias}.facet = ? AND #{facet_table_alias}.language_id = ? "
0
@@ -877,7 +877,7 @@ module Globalize # :nodoc:
0
               else
0
                 select_clause << ", COALESCE(#{facet_table_alias}.text, #{included_table}.#{facet}) " +
0
                   "AS #{assoc}_#{facet} "
0
- joins_clause << " LEFT OUTER JOIN globalize_translations AS #{facet_table_alias} " +
0
+ joins_clause << " LEFT OUTER JOIN globalize_model_translations AS #{facet_table_alias} " +
0
                   "ON #{facet_table_alias}.table_name = ? " +
0
                   "AND #{table_name}.#{fk} = #{facet_table_alias}.item_id " +
0
                   "AND #{facet_table_alias}.facet = ? AND #{facet_table_alias}.language_id = ? "
...
1
2
3
4
 
 
 
 
 
...
 
 
 
 
1
2
3
4
5
0
@@ -1,4 +1,5 @@
0
-module Globalize
0
- class ModelTranslation < Translation # :nodoc:
0
- end
0
-end
0
+module Globalize
0
+ class ModelTranslation < Translation # :nodoc:
0
+ set_table_name "globalize_model_translations"
0
+ end
0
+end

Comments

    No one has commented yet.