module Split::Cacheable::Helper::ClassMethods
Public Instance Methods
cacheable_ab_test(test_name, options)
click to toggle source
This is how you specify your tests in a sub-class of ActionController::Base ex: cacheable_ab_test
:homepage_hero, :only => :our_story, :if => Rails.env.production?
# File lib/split_cacheable/helper.rb, line 25 def cacheable_ab_test(test_name, options) options[:except] = Array(options[:except]) options[:only] = Array(options[:only]) self.split_cacheable_ab_tests << options.merge({:test_name => test_name}) end
split_cacheable_ab_tests()
click to toggle source
Class level variable. cacheable_ab_test
's get pushed onto it
# File lib/split_cacheable/helper.rb, line 33 def split_cacheable_ab_tests @split_cacheable_ab_tests ||= Array.new end