
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ActionTextの投稿機能をRspec(system spec)でテストする - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
ActionTextの投稿機能をRspec(system spec)でテストする - Qiita
class Article < ApplicationRecord has_rich_text :content belongs_to :local has_one :tag, dependen... class Article < ApplicationRecord has_rich_text :content belongs_to :local has_one :tag, dependent: :destroy accepts_nested_attributes_for :tag, allow_destroy: true default_scope -> { order(created_at: :desc)} validates :title, presence: true, length: { maximum: 255 } validate :content_required private def content_required errors.add(:content, "を入力してください") unless content.body.present? end end clas