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
--Adding Ole Begemann's <ole@oleb.net> patch to generator to fix 
assumption that all files in app/models are AR:Base descendandants
saimonmoore (author)
Fri Apr 27 02:19:41 -0700 2007
commit  6b2630fa306b0b74e0c6dbff7e97ea79c0d8c14b
tree    a8edfb653c4afb6e4f98794a78266c561a4c63a3
parent  0a9c0903311b5d181b609beea72c665c7d5f68b4
...
78
79
80
81
 
82
83
84
...
78
79
80
 
81
82
83
84
0
@@ -78,7 +78,7 @@ class GlobalizeGenerator < MigrationGenerator
0
 
0
     Dir.glob("#{RAILS_ROOT}/app/models/*.rb").each do |f|
0
       model = File.basename(f).gsub(File.extname(f),'').camelize.constantize rescue nil
0
- if model && model.base_class.superclass == ActiveRecord::Base
0
+ if model && model.respond_to?(:base_class) && model.base_class.superclass == ActiveRecord::Base
0
         if model.keep_translations_in_model || Globalize::DbTranslate.keep_translations_in_model
0
         key = "#{model.name}/#{model.table_name}"
0
         attributes_for_migrations[key] = []

Comments

    No one has commented yet.