We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29d5931 commit 3350b86Copy full SHA for 3350b86
lib/hyperloop/application.rb
@@ -96,15 +96,8 @@ def production?
96
#
97
# Returns a Hyperloop::View::Registry
98
def view_registry
99
- return @view_registry if @view_registry
100
-
101
- registry = View::Registry.new(@root)
102
103
- # Memoize if we're in production so we don't reload views on every
104
- # request.
105
- @view_registry = registry if production?
106
107
- registry
+ @view_registry = nil unless production?
+ @view_registry ||= View::Registry.new(@root)
108
end
109
110
0 commit comments