Permalink
Browse files

Automatically hook into rails view helpers

  • Loading branch information...
1 parent e16dca1 commit ab3b072db5805279d722598eca04b200ebd7ec8a @andrew andrew committed Jun 26, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/split/analytics.rb
View
@@ -38,4 +38,9 @@ module Split::Helper
include Split::Analytics
end
-# mix Spilt::Analytics into Split::Helpers
+if defined?(Rails)
+ class ActionController::Base
+ ActionController::Base.send :include, Split::Analytics
+ ActionController::Base.helper Split::Analytics
+ end
+end

0 comments on commit ab3b072

Please sign in to comment.