Sha256: b6235d46abc3cbb7b6b3622c740f20edcad61552f5b5ce5f21d5708d961fdcbd
Contents?: true
Size: 683 Bytes
Versions: 11
Compression:
Stored size: 683 Bytes
Contents
module SocialNetworking # A statement by a Participant to be shared with the Group. class OnTheMindStatement < ActiveRecord::Base belongs_to :participant has_many :comments, as: "item", dependent: :destroy has_many :likes, as: "item", dependent: :destroy validates :participant, :description, presence: true scope :for_today, lambda { where( "created_at <= ? AND created_at >= ?", Date.today.end_of_day, Date.today.beginning_of_day ) } scope :for_week, lambda { where("created_at >= ?", Time.current.advance(days: -7).beginning_of_day) } def shared_description description end end end
Version data entries
11 entries across 11 versions & 1 rubygems