Permalink
Browse files

not searching generic paths for excluded actions

  • Loading branch information...
Sergio
Sergio committed Feb 27, 2009
1 parent e721261 commit b95d0638bb350c392788822586ead2e9cba57019
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/extensions/generic_view_paths.rb
@@ -20,10 +20,14 @@ def find_template_with_active_scaffold(original_template_path, format = nil)
module ActionController #:nodoc:
class Base
- def initialize_template_class_with_active_scaffold(response)
- initialize_template_class_without_active_scaffold(response)
- response.template.view_paths.active_scaffold_paths = self.class.active_scaffold_paths
+ def assign_names_with_active_scaffold
+ assign_names_without_active_scaffold
+ @template.view_paths.active_scaffold_paths = self.class.active_scaffold_paths if search_generic_view_paths?
+ end
+ alias_method_chain :assign_names, :active_scaffold
+
+ def search_generic_view_paths?
+ self.class.action_methods.include?(self.action_name)
end
- alias_method_chain :initialize_template_class, :active_scaffold
end
end

0 comments on commit b95d063

Please sign in to comment.