Guest User

Untitled

a guest
Mar 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Follow.column_names
  2. => ["id", "followable_id", "followable_type", "follower_id", "follower_type", "blocked", "created_at", "updated_at"]
  3.  
  4. class Follow < ActiveRecord::Base
  5.  
  6. extend ActsAsFollower::FollowerLib
  7. extend ActsAsFollower::FollowScopes
  8.  
  9. # NOTE: Follows belong to the "followable" interface, and also to followers
  10. belongs_to :followable, :polymorphic => true
  11. belongs_to :follower, :polymorphic => true
  12.  
  13. def block!
  14. self.update_attribute(:blocked, true)
  15. end
  16.  
  17. end
Add Comment
Please, Sign In to add comment