Created
July 17, 2009 18:22
-
-
Save enricob/149210 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5f339cea3a179c5ba020420ebb8fe7c95f2053f6 Mon Sep 17 00:00:00 2001 | |
From: Enrico Bianco <enricob@gmail.com> | |
Date: Fri, 17 Jul 2009 14:21:00 -0400 | |
Subject: [PATCH] Regenerate @active_scaffold_paths even if one of @active_scaffold_overrides, @active_scaffold_custom_paths, or @active_scaffold_frontends is nil | |
diff --git a/lib/active_scaffold.rb b/lib/active_scaffold.rb | |
index d23c659..1604f36 100644 | |
--- a/lib/active_scaffold.rb | |
+++ b/lib/active_scaffold.rb | |
@@ -134,7 +134,13 @@ module ActiveScaffold | |
end | |
def active_scaffold_paths | |
- @active_scaffold_paths ||= ActionView::PathSet.new(@active_scaffold_overrides + @active_scaffold_custom_paths + @active_scaffold_frontends) unless @active_scaffold_overrides.nil? || @active_scaffold_custom_paths.nil? || @active_scaffold_frontends.nil? | |
+ return @active_scaffold_paths unless @active_scaffold_paths.nil? | |
+ | |
+ @active_scaffold_paths = ActionView::PathSet.new | |
+ @active_scaffold_paths.concat(@active_scaffold_overrides) unless @active_scaffold_overrides.nil? | |
+ @active_scaffold_paths.concat(@active_scaffold_custom_paths) unless @active_scaffold_custom_paths.nil? | |
+ @active_scaffold_paths.concat(@active_scaffold_frontends) unless @active_scaffold_frontends.nil? | |
+ @active_scaffold_paths | |
end | |
def active_scaffold_config | |
-- | |
1.6.0.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment