Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Raise a helpful error if config.frameworks is used

  • Loading branch information...
commit 2f8643955a780f0c2fe46d0ae68db8d51b76fbbf 1 parent a23f4b6
Carl Lerche authored
7 railties/lib/rails/configuration.rb
View
@@ -119,6 +119,13 @@ def paths
end
end
+ def frameworks(*args)
+ raise "config.frameworks in no longer supported. See the generated" \
+ "config/boot.rb for steps on how to limit the frameworks that" \
+ "will be loaded"
+ end
+ alias frameworks= frameworks
+
# Enable threaded mode. Allows concurrent requests to controller actions and
# multiple database connections. Also disables automatic dependency loading
# after boot, and disables reloading code on every request, as these are
16 railties/test/application/configuration_test.rb
View
@@ -100,5 +100,21 @@ def setup
assert !ActionController.autoload?(:RecordIdentifier)
end
+
+ test "runtime error is raised if config.frameworks= is used" do
+ add_to_config "config.frameworks = []"
+
+ assert_raises RuntimeError do
+ require "#{app_path}/config/environment"
+ end
+ end
+
+ test "runtime error is raised if config.frameworks is used" do
+ add_to_config "config.frameworks -= []"
+
+ assert_raises RuntimeError do
+ require "#{app_path}/config/environment"
+ end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.