Skip to content

Commit

Permalink
Automatically hook into rails view helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 26, 2011
1 parent e16dca1 commit ab3b072
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/split/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.