diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-12 10:58:23 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-12 10:58:23 -0700 |
commit | 3431c0b3eeaf284901bd9aa4265c578207d4c820 (patch) | |
tree | bad6de7844972fa8e39666e87f875b03676dd6a3 /lib/action_text/content.rb | |
parent | 0fd8ba6ffff07a4556ec47840ef8c9dbd10e5e8b (diff) | |
download | rails-3431c0b3eeaf284901bd9aa4265c578207d4c820.tar.gz rails-3431c0b3eeaf284901bd9aa4265c578207d4c820.tar.bz2 rails-3431c0b3eeaf284901bd9aa4265c578207d4c820.zip |
Ensure blank rich text records aren't saved or required
Diffstat (limited to 'lib/action_text/content.rb')
-rw-r--r-- | lib/action_text/content.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action_text/content.rb b/lib/action_text/content.rb index c296896ac4..22b52cff1c 100644 --- a/lib/action_text/content.rb +++ b/lib/action_text/content.rb @@ -4,7 +4,7 @@ module ActionText attr_reader :fragment - delegate :blank?, :empty?, :html_safe, :present?, to: :to_s + delegate :blank?, :empty?, :html_safe, :present?, to: :to_html # Delegating to to_html to avoid including the layout def initialize(content = nil) @fragment = ActionText::Attachment.fragment_by_canonicalizing_attachments(content) |