Permalink
Browse files

autoload HighVoltage::PageFinder to avoid uninitialized constant error

  • Loading branch information...
frozenmouse committed Oct 8, 2012
1 parent 6cac4ee commit 99b9ab38b9a9e5f880836fb2bfe4875b6c1ef2cc
Showing with 2 additions and 2 deletions.
  1. +0 −2 app/controllers/high_voltage/pages_controller.rb
  2. +2 −0 lib/high_voltage.rb
@@ -1,5 +1,3 @@
-require 'high_voltage/page_finder'
-
class HighVoltage::PagesController < ApplicationController
unloadable
layout Proc.new { |_| HighVoltage.layout }
View
@@ -15,4 +15,6 @@ def self.setup
end
require 'high_voltage/engine' if defined?(Rails)
+
+ autoload :PageFinder, 'high_voltage/page_finder'
end

0 comments on commit 99b9ab3

Please sign in to comment.