Sha256: 93f956b30b93aecc97789e852f77504bd18c389e54d6b35d3de4f3084f922f41
Contents?: true
Size: 483 Bytes
Versions: 11
Compression:
Stored size: 483 Bytes
Contents
module SocialNetworking # An item that a Participant has shared. class SharedItem < ActiveRecord::Base before_save :default_creator, :set_action_type belongs_to :item, polymorphic: true has_many :comments, as: "item" has_many :likes, as: "item" belongs_to :participant private def default_creator self.participant_id = item.participant_id end def set_action_type self.action_type = Shareable.new(item).action end end end
Version data entries
11 entries across 11 versions & 1 rubygems