Created
April 25, 2019 20:32
-
-
Save davit-khaburdzania/4a6aed8c9e1ac804e881a806728e71d3 to your computer and use it in GitHub Desktop.
tagging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tag < ApplicationRecord | |
has_many :taggings | |
has_many :posts, through: :taggings | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tagging < ApplicationRecord | |
belongs_to :tag | |
belongs_to :post | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment