OSDN Git Service

Fixed Trac importer error with Rails 2.0: readonly? is defined by ActiveRecord.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Dec 2007 21:31:30 +0000 (21:31 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Dec 2007 21:31:30 +0000 (21:31 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@995 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_trac.rake

index 37514df..828027b 100644 (file)
@@ -145,6 +145,11 @@ namespace :redmine do
       
       class TracWikiPage < ActiveRecord::Base
         set_table_name :wiki  
+        
+        def self.columns
+          # Hides readonly Trac field to prevent clash with AR readonly? method (Rails 2.0)
+          super.select {|column| column.name.to_s != 'readonly'}
+        end
       end
       
       class TracPermission < ActiveRecord::Base