class View < Element
- Inherits from
Element: #selector, #forward_event, #forward_form_event, #bind, #close, #handle, #rpc, #script, #update!, #replace, #prepend, #append, #remove, #dispatch_event, #render, #append_markup, #to_html, #to_s, .unique_id, .root, .child, .mount
Represents a single division of content on the page and provides helpers for rendering the content.
Definitions
def tag_name
Get the custom element tag name used to render the view.
Signature
-
returns
String The custom element tag name.
Implementation
def tag_name
"live-view"
end
def build_markup(builder)
Signature
-
returns
Object The generated HTML.
Implementation
def build_markup(builder)
builder.inline_tag self.tag_name, id: @id, data: @data do
render(builder)
end
end