Sha256: a3fef008fa21aea871e4c02bf2347b0fabfd0cb6a1d6b522238f41c62e104230
Contents?: true
Size: 898 Bytes
Versions: 10
Compression:
Stored size: 898 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 scope :newer_than, lambda { |*args| where("created_at > ?", args.first || DateTime.now) } scope :by_newest, order("created_at DESC") scope :entries_only, where("personal_recommendations.destination_type = 'Entry'") scope :users, where("personal_recommendations.destination_type = 'User'") end
Version data entries
10 entries across 10 versions & 1 rubygems