Sha256: 8b27df0a7779cd661d6dfdb30df035d87ea5fe93dd13bf72b98c3d2e3e4dc1dc
Contents?: true
Size: 985 Bytes
Versions: 26
Compression:
Stored size: 985 Bytes
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 belongs_to :personal_recommendable, :polymorphic => true belongs_to :destination, :polymorphic => true 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
26 entries across 26 versions & 1 rubygems