Module: ActionView::Helpers::FormTagHelper

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

Instance Method Summary collapse

Instance Method Details

#form_tag_with_context_help_form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block) ⇒ Object



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

def form_tag_with_context_help_form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block)
  help_options = ContextHelp::Helpers.merge_options({:context_help => {:path => {:tag => :form, :tag_options => options.dup}}}, options)
  ContextHelp::Base.help_for(help_options)
  form_tag_without_context_help_form_tag(url_for_options, options, *parameters_for_url, &block)        
end

#label_tag_with_context_help_label_tag(name, text = nil, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/context_help/patches/form_tag_helper_patch.rb', line 9

def label_tag_with_context_help_label_tag(name, text = nil, options = {})
  help_options = ContextHelp::Helpers.merge_options({:context_help => {:path => {:tag => :label, :tag_options => options.dup}}}, options)
  text ||= name.to_s.humanize
  text = text + ContextHelp::Base.help_for(help_options)
  
  options.delete('context_help')
  label_tag_without_context_help_label_tag name, text, options
end