diff options
author | Chris Eppstein <chris@eppsteins.net> | 2011-06-13 22:45:34 -0700 |
---|---|---|
committer | Chris Eppstein <chris@eppsteins.net> | 2011-06-27 13:44:53 -0700 |
commit | 266b80c7b28c7587ab1c75aae6e3288e2f6c1aba (patch) | |
tree | 6496df79a4a26af7e623faaa139af6a426cae395 | |
parent | f63f0baa59356fcb68beed46d4d6a26248c6385c (diff) | |
download | rails-266b80c7b28c7587ab1c75aae6e3288e2f6c1aba.tar.gz rails-266b80c7b28c7587ab1c75aae6e3288e2f6c1aba.tar.bz2 rails-266b80c7b28c7587ab1c75aae6e3288e2f6c1aba.zip |
OrderedOptions must implement respond_to? if it implements method_missing.
-rw-r--r-- | activesupport/lib/active_support/ordered_options.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 8d8e6ebc58..bf81567d22 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -36,6 +36,10 @@ module ActiveSupport #:nodoc: self[name] end end + + def respond_to?(name) + true + end end class InheritableOptions < OrderedOptions diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 52c89274e7..bf57a034b2 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -538,15 +538,9 @@ module Rails end initializer :append_assets_path do |app| - if app.config.assets.respond_to?(:prepend_path) - app.config.assets.prepend_path(*paths["vendor/assets"].existent) - app.config.assets.prepend_path(*paths["lib/assets"].existent) - app.config.assets.prepend_path(*paths["app/assets"].existent) - else - app.config.assets.paths.unshift(*paths["vendor/assets"].existent) - app.config.assets.paths.unshift(*paths["lib/assets"].existent) - app.config.assets.paths.unshift(*paths["app/assets"].existent) - end + app.config.assets.paths.unshift(*paths["vendor/assets"].existent) + app.config.assets.paths.unshift(*paths["lib/assets"].existent) + app.config.assets.paths.unshift(*paths["app/assets"].existent) end initializer :prepend_helpers_path do |app| |