method
from_node
v7.1.3.4 -
Show latest stable
- Class:
ActionText::Attachables::ContentAttachment
from_node(node)public
No documentation available.
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 8
def self.from_node(node)
attachment = new(content_type: node["content-type"], content: node["content"])
attachment if attachment.valid?
end