Fixed visit_model method

Andrew Kane committed Mar 19, 2014
commit 42c0e78532a6d2b13479fb951965cd0d9f13af2a
Showing 2 changed files with 5 additions and 6 deletions
ahoy/engine.rb b/lib/ahoy/engine.rb +0 -5
@@ @@ -1,10 +1,5 @@
module Ahoy
class Engine < ::Rails::Engine
isolate_namespace Ahoy
-
- initializer "ahoy" do |app|
- Ahoy.visit_model ||= Visit
- end
-
end
end
ahoy_matey.rb b/lib/ahoy_matey.rb +5 -1
@@ @@ -8,7 +8,11 @@ require "ahoy/model"
require "ahoy/engine"
module Ahoy
- mattr_accessor :visit_model
+
+ def self.visit_model
+ ::Visit
+ end
+
end
ActionController::Base.send :include, Ahoy::Controller