Module: MerbI18n::Helpers

Included in:
Merb::Helpers::Form
Defined in:
lib/merb-i18n.rb

Instance Method Summary collapse

Instance Method Details

#error_messages_for(obj = nil, opts = {}) ⇒ Object



44
45
46
47
48
49
# File 'lib/merb-i18n.rb', line 44

def error_messages_for(obj = nil, opts = {})
  current_form_context.error_messages_for(obj, opts[:error_class] || "error", 
    opts[:build_li] || "<li>%s</li>",
    opts[:header] || "<h2>#{i18n.merb.error_messages_for_header}</h2>",
    opts.key?(:before) ? opts[:before] : true)
end