Module: VueRailsFormBuilder::TagHelper

Includes:
VueOptionsResolver
Defined in:
lib/vue-rails-form-builder/tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#vue_content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/vue-rails-form-builder/tag_helper.rb', line 12

def (name, content_or_options_with_block = nil, options = nil,
  escape = true, &block)

  if block_given?
    if content_or_options_with_block.is_a?(Hash)
      resolve_vue_options(content_or_options_with_block)
    end
  else
    resolve_vue_options(options) if options
  end

  (name, content_or_options_with_block, options, escape, &block)
end

#vue_tag(name, options = nil, open = false, escape = true) ⇒ Object



7
8
9
10
# File 'lib/vue-rails-form-builder/tag_helper.rb', line 7

def vue_tag(name, options = nil, open = false, escape = true)
  resolve_vue_options(options) if options
  tag(name, options, open, escape)
end