foalfetch/app/models/blog.rb
2024-04-06 07:00:46 -04:00

15 lines
428 B
Ruby

# frozen_string_literal: true
# == Schema Information
#
# Table name: blogs
#
# id :bigint not null, primary key
# body :text not null
# title :text not null
# created_at :datetime not null
# updated_at :datetime not null
#
class Blog < ApplicationRecord
validates :title, presence: true, length: { maximum: 128 }
validates :body, presence: true
end