Module: ActionView::Helpers::TagHelper

Defined in:
lib/context_help/patches/tag_helper_patch.rb

Instance Method Summary collapse

Instance Method Details

#content_tag_with_context_help_content_tag(name, content_or_options_with_block = nil, options = {}, escape = true, &block) ⇒ Object



9
10
11
12
13
# File 'lib/context_help/patches/tag_helper_patch.rb', line 9

def (name, content_or_options_with_block = nil, options = {}, escape = true, &block)
  help_options = ContextHelp::Helpers.merge_options({:context_help => {:path => {:tag => name.to_sym, :tag_options => options.dup}}}, options)
  help = ContextHelp::Base.help_for(help_options)
  (name, content_or_options_with_block, ContextHelp::Helpers.clean(options), escape, &block) + help
end

#tag_with_context_help_tag(name, options = {}, open = false, escape = true) ⇒ Object



4
5
6
7
8
# File 'lib/context_help/patches/tag_helper_patch.rb', line 4

def tag_with_context_help_tag(name, options = {}, open = false, escape = true)
  help_options = ContextHelp::Helpers.merge_options({:context_help => {:path => {:tag => name.to_sym, :tag_options => options.dup}}}, options)
  help = ContextHelp::Base.help_for(help_options)
  tag_without_context_help_tag(name, ContextHelp::Helpers.clean(options), open, escape) + help
end