Module: ActionView::Helpers::VueTagHelper

Defined in:
lib/actionview/vue_tag_helper.rb

Overview

Provides the vue view helper, a sibling of the built-in tag helper tuned for rendering Vue component markup.

See ActionView::Helpers::TagHelper::VueBuilder for full documentation on how attribute quoting differs from the standard TagBuilder.

Examples:

vue.MyComponent(label: "Hello", data: {items: [{id: 1}]})
# => <my-component label="Hello" data-items='[{"id":1}]'></my-component>

Instance Method Summary collapse

Instance Method Details

#vueActionView::Helpers::TagHelper::VueBuilder

Returns the VueBuilder proxy for this view context.

Every call within the same render cycle returns the same instance, mirroring how tag works.



28
29
30
# File 'lib/actionview/vue_tag_helper.rb', line 28

def vue
  @vue ||= TagHelper::VueBuilder.new(self)
end