Class: IdentityFeed

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/identity_feed.rb

Overview

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

Instance Method Summary collapse

Instance Method Details

#can_edit?(user) ⇒ Boolean

override this method to change the way permissions are handled on comments

Returns:

  • (Boolean)


18
19
20
21
22
23
24
# File 'app/models/identity_feed.rb', line 18

def can_edit?(user)
  if ownable == user || check_user(user)
    true
  else
    false
  end
end