Sha256: 8c4e5437dd87f2d85b6dd05447e2d69b5415db19d06e0ee7a0ff18f9900fff04

Contents?: true

Size: 364 Bytes

Versions: 5

Compression:

Stored size: 364 Bytes

Contents

class Feed < ActiveRecord::Base
  include MyFeeds::Identify
  attr_accessible :source_id, :source_type, :event, :target_id, :target_type

  #verify event uniqueness
  #validates :event, uniqueness: {scope: [:source_id, :source_type, :target_id, :target_type]}, :if => :target_id

  belongs_to :source, polymorphic: true
  belongs_to :target, polymorphic: true
end

Version data entries

5 entries across 3 versions & 1 rubygems

Version Path
my_feeds-0.1.1 lib/rails/generators/templates/model.rb
my_feeds-0.1.1 spec/models/feed.rb
my_feeds-0.1.0 lib/rails/generators/templates/model.rb
my_feeds-0.1.0 spec/models/feed.rb
my_feeds-0.0.1 lib/rails/generators/templates/model.rb