Sha256: 68698053fffdb5438dfe1d312d0832b857c99bac2443d7d40af378cfa41f5555
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
# == Schema Information # # Table name: personal_recommendations # # id :integer(4) not null, primary key # personal_recommendable_id :integer(4) # personal_recommendable_type :string(255) # destination_id :integer(4) # destination_type :string(255) # relevance :float # 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'"] end
Version data entries
6 entries across 6 versions & 1 rubygems