Sha256: adfacc7edac881a3f85f65a36d97349f57cf833f62dc99e745b59591a6ef2b18

Contents?: true

Size: 283 Bytes

Versions: 2

Compression:

Stored size: 283 Bytes

Contents

module MiniBlog
  class Article < ApplicationRecord
    has_many :article_tag_relations, dependent: :destroy
    has_many :tags, through: :article_tag_relations

    validates :title, presence: true
    validates :body, presence: true
    validates :status, 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/article.rb
mini_blog-0.1.0 app/models/mini_blog/article.rb