Permalink
Browse files

specify Abingo namespace for experiment/alternatives associations so …

…we don't get the constant error
  • Loading branch information...
1 parent 454ff30 commit 1410cebb35e42e8b8045d9d4bf1a4bf97627920a @ryanb committed May 17, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/abingo/alternative.rb
  2. +1 −1 lib/abingo/experiment.rb
@@ -1,7 +1,7 @@
class Abingo::Alternative < ActiveRecord::Base
include Abingo::ConversionRate
- belongs_to :experiment
+ belongs_to :experiment, :class_name => "Abingo::Experiment"
serialize :content
def self.calculate_lookup(test_name, alternative_name)
View
@@ -2,7 +2,7 @@ class Abingo::Experiment < ActiveRecord::Base
include Abingo::Statistics
include Abingo::ConversionRate
- has_many :alternatives, :dependent => :destroy
+ has_many :alternatives, :dependent => :destroy, :class_name => "Abingo::Alternative"
validates_uniqueness_of :test_name
def cache_keys

0 comments on commit 1410ceb

Please sign in to comment.