Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Article < ActiveRecord::Base
- has_many :comments
- has_many :taggings
- has_many :tags, through: :taggings
- class Tag < ActiveRecord::Base
- has_many :taggings
- has_many :articles, through: :taggings
- def to_s
- name
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement