Skip to content

Commit

Permalink
Merge pull request rails#7872 from kennyj/should_use_app_paths
Browse files Browse the repository at this point in the history
Should use app.paths instead of specific path.
  • Loading branch information
José Valim committed Oct 8, 2012
2 parents 800604e + 4756ced commit 28a375a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion activerecord/lib/active_record/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class Railtie < Rails::Railtie # :nodoc:
end

initializer "active_record.add_watchable_files" do |app|
config.watchable_files.concat ["#{app.root}/db/schema.rb", "#{app.root}/db/structure.sql"]
path = app.paths["db"].first
config.watchable_files.concat ["#{path}/schema.rb", "#{path}/structure.sql"]
end

config.after_initialize do |app|
Expand Down

0 comments on commit 28a375a

Please sign in to comment.