Sha256: 345c8dedb12b925bfd4d0cde4043b03c0b4ea2f73d88510b77daff40b05f786b

Contents?: true

Size: 208 Bytes

Versions: 2

Compression:

Stored size: 208 Bytes

Contents

module MiniBlog
  class Tag < ApplicationRecord
    has_many :article_tag_relations, dependent: :destroy
    has_many :articles, through: :article_tag_relations

    validates :name, presence: true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mini_blog-0.1.1 app/models/mini_blog/tag.rb
mini_blog-0.1.0 app/models/mini_blog/tag.rb