method

from_node

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ContentAttachment
from_node(node) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 8
      def self.from_node(node)
        if node["content-type"]
          if matches = node["content-type"].match(/vnd\.rubyonrails\.(.+)\.html/)
            attachment = new(name: matches[1])
            attachment if attachment.valid?
          end
        end
      end
Register or log in to add new notes.