Add method to confirm rich text content existence by adding ? after content name
This change introduces a rich text object to make it easier to confirm it context is existing or not. If we have a class like below. class Information < ApplicationRecord has_rich_text :notes end Before: i = Information.new i.notes? => NoMethodError i.notes = "Some sample text" i.notes.present? => true After: i = Information.new i.notes? => false i.notes = "Some sample text" i.notes? => true
Showing
想要评论请 注册 或 登录