The use_schema_cache_dump configuration moved to ActiveRecord. #7224

Merged
merged 1 commit into from Aug 1, 2012

2 participants

@kennyj

Please see 0da12df.

cc/ @josevalim

@kennyj

Do you mean app.config.active_record.use_schema_cache_dump ?
If so, I guess we should add ActiveRecord::Base.use_schema_cache_dump too.

 71     initializer "active_record.set_configs" do |app|
 72       ActiveSupport.on_load(:active_record) do
 73         app.config.active_record.each do |k,v|
 74           send "#{k}=", v
 75         end
 76       end
 77     end
@josevalim
Ruby on Rails member

Sorry, I was not clear. Yes, it should be config.active_record.use_schema_cache_dump but it does not need to be part of Active Record. What you can do is:

config.active_record.use_schema_cache_dump = true

# This should be placed before the initializer that sets the config in AR you copied above
initializer "active_record.check_schema_cache_dump" do
  if config.active_record.delete(:use_schema_cache_dump)
    config.after_initialize ...
  end
end
@kennyj

Thank you for suggestion.
I updated this PR.

@josevalim josevalim merged commit 0d45d4e into rails:master Aug 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment