Sha256: 3b46b3dabd3ec285b930bddad1acd5fab35272937e91d1892f1c44d32d5a2f73

Contents?: true

Size: 402 Bytes

Versions: 2

Compression:

Stored size: 402 Bytes

Contents

class Follow < ActiveRecord::Base

  attr_accessible :followable_type, :followable_id

  extend ActsAsFollower::FollowerLib
  extend ActsAsFollower::FollowScopes

  # NOTE: Follows belong to the "followable" interface, and also to followers
  belongs_to :followable, :polymorphic => true
  belongs_to :follower,   :polymorphic => true

  def block!
    self.update_attribute(:blocked, true)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
private_person-0.3.0 spec/dummy/app/models/follow.rb
private_person-0.2.9 spec/dummy/app/models/follow.rb