summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-14 21:31:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-14 21:31:30 +0000
commitd1a3fbea4087bdf5bb06b2bf231a2fe9bda65201 (patch)
tree356fe8f99976fe61b7d418fcc612570af64e315c
parent58610ec52af2249c4c5eebf35e11cd827a7966ab (diff)
downloadredmine-d1a3fbea4087bdf5bb06b2bf231a2fe9bda65201.tar.gz
redmine-d1a3fbea4087bdf5bb06b2bf231a2fe9bda65201.zip
Fixed Trac importer error with Rails 2.0: readonly? is defined by ActiveRecord.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@995 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/tasks/migrate_from_trac.rake5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake
index 37514df01..828027b87 100644
--- a/lib/tasks/migrate_from_trac.rake
+++ b/lib/tasks/migrate_from_trac.rake
@@ -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