aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-10-16 19:08:09 -0500
committerJoshua Peek <josh@joshpeek.com>2009-10-16 19:08:09 -0500
commit4cebd41d9e9764b29a5673a298a71b0c530b2bf6 (patch)
tree246d28becc55dd7e865256afc7990cc67fe4fe20
parentc1261b5484c10930be9f737abfc164f9ba072629 (diff)
downloadrails-4cebd41d9e9764b29a5673a298a71b0c530b2bf6.tar.gz
rails-4cebd41d9e9764b29a5673a298a71b0c530b2bf6.tar.bz2
rails-4cebd41d9e9764b29a5673a298a71b0c530b2bf6.zip
Fix Rails root in sqlite adapter
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 5a49fc2d2f..c9c2892ba4 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -11,11 +11,11 @@ module ActiveRecord
raise ArgumentError, "No database file specified. Missing argument: database"
end
- # Allow database path relative to RAILS_ROOT, but only if
+ # Allow database path relative to Rails.root, but only if
# the database path is not the special path that tells
# Sqlite to build a database only in memory.
- if Object.const_defined?(:RAILS_ROOT) && ':memory:' != config[:database]
- config[:database] = File.expand_path(config[:database], RAILS_ROOT)
+ if Object.const_defined?(:Rails) && ':memory:' != config[:database]
+ config[:database] = File.expand_path(config[:database], Rails.root)
end
end
end