aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_text/attachment.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-04-13 14:10:18 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-04-13 14:10:18 -0700
commit491bee6e64863f2dc6e8d1f59829e61d4a8c86ad (patch)
treee5c536c6cd106685633d2e7d1fc67f2d8b95406c /lib/active_text/attachment.rb
parent7c4e70ea0bf0f00c0e919128447412fab49772f9 (diff)
downloadrails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.tar.gz
rails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.tar.bz2
rails-491bee6e64863f2dc6e8d1f59829e61d4a8c86ad.zip
Use rich_text instead of active_text
Just like we use has_many_attachments instead of active_storage_attachements.
Diffstat (limited to 'lib/active_text/attachment.rb')
-rw-r--r--lib/active_text/attachment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/active_text/attachment.rb b/lib/active_text/attachment.rb
index 870390f63e..fab6c3507b 100644
--- a/lib/active_text/attachment.rb
+++ b/lib/active_text/attachment.rb
@@ -20,7 +20,7 @@ module ActiveText
end
def from_attachable(attachable, attributes = {})
- if node = node_from_attributes(attachable.to_active_text_attributes(attributes))
+ if node = node_from_attributes(attachable.to_rich_text_attributes(attributes))
new(node, attachable)
end
end
@@ -91,7 +91,7 @@ module ActiveText
end
def attachable_attributes
- @attachable_attributes ||= (attachable.try(:to_active_text_attributes) || {}).stringify_keys
+ @attachable_attributes ||= (attachable.try(:to_rich_text_attributes) || {}).stringify_keys
end
def sgid_attributes