Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Includes:
GetText
Defined in:
lib/gettext/rails.rb

Constant Summary

Constants included from GetText

GetText::CACHE_BOUND_TARGET_MAX_SIZE, GetText::VERSION

Instance Method Summary collapse

Methods included from GetText

N_, #Nn_, _, #add_default_locale_path, bindtextdomain, #bindtextdomain_to, bound_target, bound_targets, cached=, cached?, cgi, cgi=, clear_cache, create_mofiles, current_textdomain_info, each_textdomain, find_targets, gettext, included, locale, locale=, msgmerge, msgmerge_all, n_, ngettext, #npgettext, ns_, nsgettext, output_charset, output_charset=, p_, pgettext, remove_all_textdomains, rgettext, rmsgfmt, rmsgmerge, s_, set_cgi, set_locale, set_locale_all, set_output_charset, setlocale, sgettext, textdomain, #textdomain_to, update_pofiles

Instance Method Details

#label_with_gettext(method, text = nil, options = {}) ⇒ Object



308
309
310
311
# File 'lib/gettext/rails.rb', line 308

def label_with_gettext(method, text = nil, options = {})
  text ||= s_("#{@object.class}|#{method.to_s.humanize}")
  @template.label(@object_name, method, text, options.merge(:object => @object))
end