Sha256: 600b5a9584d7ff6cb7411ecfa7ca2bf8b5147159068541fd84200c3048fef1e8
Contents?: true
Size: 609 Bytes
Versions: 77
Compression:
Stored size: 609 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] # Determines whether or not he given user can edit the identity feed def can_edit?(user) if ownable == user || user.admin? true else false end end end
Version data entries
77 entries across 77 versions & 2 rubygems