diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-07 15:50:46 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-08-07 15:50:46 -0700 |
commit | 8121eefc222fbd8979ab70d89725a2e330f5a9b2 (patch) | |
tree | a51235a8f0d059b83ba15efddcc067d6299165e1 /railties/lib | |
parent | 22969898262b8c92bea1ac93b668a817c7511158 (diff) | |
download | rails-8121eefc222fbd8979ab70d89725a2e330f5a9b2.tar.gz rails-8121eefc222fbd8979ab70d89725a2e330f5a9b2.tar.bz2 rails-8121eefc222fbd8979ab70d89725a2e330f5a9b2.zip |
add a new constructor that runs load hooks
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 796c068a10..61639be7c6 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -94,6 +94,10 @@ module Rails super.run_load_hooks! end + def create(initial_variable_values = {}, &block) + new(initial_variable_values, &block).run_load_hooks! + end + # Makes the +new+ method public. # # Note that Rails::Application inherits from Rails::Engine, which |