Skip to Content Skip to Search
Methods
A
F
N
T

Attributes

[R] content_type
[R] height
[R] url
[R] width

Class Public methods

from_node(node)

# File actiontext/lib/action_text/attachables/remote_image.rb, line 9
def from_node(node)
  if node["url"] && content_type_is_image?(node["content-type"])
    new(attributes_from_node(node))
  end
end

new(attributes = {})

# File actiontext/lib/action_text/attachables/remote_image.rb, line 30
def initialize(attributes = {})
  @url = attributes[:url]
  @content_type = attributes[:content_type]
  @width = attributes[:width]
  @height = attributes[:height]
end

Instance Public methods

attachable_plain_text_representation(caption)

# File actiontext/lib/action_text/attachables/remote_image.rb, line 37
def attachable_plain_text_representation(caption)
  "[#{caption || "Image"}]"
end

to_partial_path()

# File actiontext/lib/action_text/attachables/remote_image.rb, line 41
def to_partial_path
  "action_text/attachables/remote_image"
end