From 8121eefc222fbd8979ab70d89725a2e330f5a9b2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 7 Aug 2014 15:50:46 -0700 Subject: add a new constructor that runs load hooks --- railties/lib/rails/application.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib/rails/application.rb') 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 -- cgit v1.2.3