Sha256: bde6a9ef0146ab56a02c193fb1eee6b278618a660b19f097775943c6bd094f11

Contents?: true

Size: 622 Bytes

Versions: 10

Compression:

Stored size: 622 Bytes

Contents

# == Schema Information
#
# Table name: identity_feeds
#
#  id           :integer(4)      not null, primary key
#  feed_id      :integer(4)      not null
#  ownable_id   :integer(4)      not null
#  ownable_type :string(255)     not null
#

class IdentityFeed < ActiveRecord::Base
  belongs_to :ownable, :polymorphic => true
  belongs_to :feed
  
  validates_uniqueness_of :feed_id, :scope => [:ownable_id, :ownable_type]
  
  # override this method to change the way permissions are handled on comments
  def can_edit?(user)
    if ownable == user || check_user(user)
      true
    else
      false
    end
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
muck-raker-0.1.37 app/models/identity_feed.rb
muck-raker-0.1.36 app/models/identity_feed.rb
muck-raker-0.1.35 app/models/identity_feed.rb
muck-raker-0.1.32 app/models/identity_feed.rb
muck-raker-0.1.33 app/models/identity_feed.rb
muck-raker-0.1.31 app/models/identity_feed.rb
muck-raker-0.1.30 app/models/identity_feed.rb
muck-raker-0.1.29 app/models/identity_feed.rb
muck-raker-0.1.28 app/models/identity_feed.rb
muck-raker-0.1.27 app/models/identity_feed.rb