method

from_node

from_node(node)
public

No documentation available.

# 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