1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actiontext/lib/action_text
Kyohei Toyoda 07533a3d2f 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
2019-12-13 12:58:42 +09:00
..
attachables Use match? where we don't need MatchData 2019-07-29 14:23:10 +09:00
attachments It may be better to explicitly require 'object/try' where we call try 2019-08-01 18:51:51 +09:00
attachable.rb Adds default trix partial 2019-03-05 11:29:32 -06:00
attachment.rb It may be better to explicitly require 'object/try' where we call try 2019-08-01 18:51:51 +09:00
attachment_gallery.rb Use match? where we don't need MatchData 2019-07-29 14:23:10 +09:00
attribute.rb Add method to confirm rich text content existence by adding ? after content name 2019-12-13 12:58:42 +09:00
content.rb
engine.rb Fix ActiveStorage::Blob → ActionText::TrixAttachment conversion 2019-12-03 05:57:36 -05:00
fragment.rb
gem_version.rb Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
html_conversion.rb
plain_text_conversion.rb Cleanup unneeded blank string params in ActionText 2019-08-23 20:17:38 +02:00
serialization.rb
system_test_helper.rb Allow filling in the only rich-text area without a locator 2019-05-19 01:55:53 -04:00
trix_attachment.rb
version.rb