nerdhub/hcking

View on GitHub
app/models/tagging.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Tagging < ActiveRecord::Base
  belongs_to :tag
  belongs_to :taggable, polymorphic: true


  scope :tags,  -> { where("context = 'tags'") }
  scope :likes, -> { where("context = 'likes'") }
  scope :hates, -> { where("context = 'hates'") }
end