method
from_node
v6.1.3.1 -
Show latest stable
- Class:
ActionText::Attachable
from_node(node)public
No documentation available.
# File actiontext/lib/action_text/attachable.rb, line 10
def from_node(node)
if attachable = attachable_from_sgid(node["sgid"])
attachable
elsif attachable = ActionText::Attachables::ContentAttachment.from_node(node)
attachable
elsif attachable = ActionText::Attachables::RemoteImage.from_node(node)
attachable
else
ActionText::Attachables::MissingAttachable
end
end