Sha256: 93d3b870d718039268672d5e501e4872d24b2aae1004520d68254f52a0cb715f

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 Bytes

Contents

module Socialization
  module MentionStore
    extend ActiveSupport::Concern

    included do
      belongs_to :mentioner,   :polymorphic => true
      belongs_to :mentionable, :polymorphic => true

      validates_uniqueness_of :mentionable_type, :scope => [:mentionable_id, :mentioner_type, :mentioner_id], :message => 'You cannot mention the same thing twice in a given object.'

      def self.human_attribute_name(*args); ''; end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
socialization-0.4.0 lib/socialization/mention_store.rb