Sha256: ee5c03b3bdbb5622afd4a7b71536dcb0551f980eb0f77a31a8f1a541945258b8

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

class Follow < ActiveRecord::Base

  extend FollowableBehaviour::FollowerLib
  extend FollowableBehaviour::FollowScopes

  # NOTE: Follows belong to the "followable" and "follower" interface
  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
followable_behaviour-0.2.0 lib/generators/templates/model.rb
followable_behaviour-0.1.0 lib/generators/templates/model.rb