Module: ActionView::Helpers::ActiveRecordHelper
- Defined in:
- lib/gettext/rails.rb
Overview
:nodoc: all
Defined Under Namespace
Modules: L10n
Instance Method Summary collapse
-
#error_message_explanation(msg) ⇒ Object
:nodoc:.
-
#error_message_title(msg) ⇒ Object
:nodoc:.
- #error_messages_for(*params) ⇒ Object
-
#error_messages_for_without_localize ⇒ Object
:nodoc:.
Instance Method Details
#error_message_explanation(msg) ⇒ Object
:nodoc:
368 369 370 371 372 373 374 |
# File 'lib/gettext/rails.rb', line 368 def (msg) #:nodoc: if msg [_(msg[0]), _(msg[1])] else nil end end |
#error_message_title(msg) ⇒ Object
:nodoc:
360 361 362 363 364 365 366 |
# File 'lib/gettext/rails.rb', line 360 def (msg) #:nodoc: if msg [_(msg[0]), _(msg[1])] else nil end end |
#error_messages_for(*params) ⇒ Object
378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/gettext/rails.rb', line 378 def (*params) = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {} objects = params.collect {|object_name| instance_variable_get("@#{object_name}") }.compact object_names = params.dup count = objects.inject(0) {|sum, object| sum + object.errors.count } if count.zero? '' else L10n.(self, objects, object_names, count, ) end end |
#error_messages_for_without_localize ⇒ Object
:nodoc:
376 |
# File 'lib/gettext/rails.rb', line 376 alias |