Skip to content

Commit

Permalink
ActiveRecord's use of RAILS_ROOT for sqlite drop db operation
Browse files Browse the repository at this point in the history
Quick change from RAILS_ROOT to Merb.root so that dropping databases
now works with sqlite.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
  • Loading branch information
nanodeath authored and michaelklishin committed May 7, 2008
1 parent 90a0221 commit 08ea990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion merb_activerecord/lib/active_record/merbtasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def drop_database(config)
when 'mysql'
ActiveRecord::Base.connection.drop_database config[:database]
when /^sqlite/
FileUtils.rm(File.join(RAILS_ROOT, config[:database]))
FileUtils.rm(File.join(Merb.root, config[:database]))
when 'postgresql'
ActiveRecord::Base.clear_active_connections!
`dropdb "#{config[:database]}"`
Expand Down

0 comments on commit 08ea990

Please sign in to comment.