Permalink
Browse files

OrderedOptions must implement respond_to? if it implements method_mis…

…sing.
  • Loading branch information...
1 parent 34d16e1 commit 729d8688af2730e499b0781d6bfff156e111e8fd @chriseppstein chriseppstein committed Jun 14, 2011
Showing with 7 additions and 9 deletions.
  1. +4 −0 activesupport/lib/active_support/ordered_options.rb
  2. +3 −9 railties/lib/rails/engine.rb
View
4 activesupport/lib/active_support/ordered_options.rb
@@ -36,6 +36,10 @@ def method_missing(name, *args)
self[name]
end
end
+
+ def respond_to?(name)
+ true
+ end
end
class InheritableOptions < OrderedOptions
View
12 railties/lib/rails/engine.rb
@@ -522,15 +522,9 @@ def load_seed
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|

0 comments on commit 729d868

Please sign in to comment.