app/models/personal_recommendation.rb in muck-services-0.1.41 vs app/models/personal_recommendation.rb in muck-services-0.1.42

- old
+ new

@@ -11,17 +11,13 @@ # created_at :datetime # visited_at :datetime # class PersonalRecommendation < ActiveRecord::Base - unloadable - + belongs_to :personal_recommendable, :polymorphic => true belongs_to :destination, :polymorphic => true - - belongs_to :entry, :class_name => 'Entry', :foreign_key => 'destination_id', :include => :feed - belongs_to :user, :class_name => 'User', :foreign_key => 'destination_id' - + named_scope :limit, lambda { |num| { :limit => num } } named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } } named_scope :newest, :order => "created_at DESC" named_scope :entries_only, :conditions => ["personal_recommendations.destination_type = 'Entry'"] named_scope :users, :conditions => ["personal_recommendations.destination_type = 'User'"]