Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Shim Initializer.run

  • Loading branch information...
commit 07c5e5416be3dbd53ffc502724435b0dc95fd0ef 1 parent 8158afa
@wycats wycats authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 railties/lib/rails/deprecation.rb
View
8 railties/lib/rails/deprecation.rb
@@ -2,6 +2,14 @@
require "active_support/basic_object"
module Rails
+ module Initializer
+ def self.run(&block)
+ klass = Class.new(Rails::Application)
+ klass.instance_exec(klass.config, &block)
+ klass.initialize!
+ end
+ end
+
class DeprecatedConstant < ActiveSupport::BasicObject
def self.deprecate(old, new)
constant = self.new(old, new)
Please sign in to comment.
Something went wrong with that request. Please try again.