app/decorators/training_decorator.rb
# Creates the Hash of all the pre-computed attributes used by type-ahead look-up
# combos and lists.
#
# == Returns:
# An Hash instance having the following structure:
# <tt>{
#       :label                  => #get_full_name,
#       :value                  => id,
#       :tot_distance           => #compute_total_distance(),
#       :tot_secs               => #compute_total_seconds(),
#       :user_name              => user associated with the decorated Training or UserTraining,
#       :swimmer_level_type_description => #get_swimmer_level_type( :i18n_description ),
#       :swimmer_level_type_alternate   => #get_swimmer_level_type( :i18n_alternate ),
#     }</tt>.
#
Creates the Hash of all the pre-computed attributes used by type-ahead look-up
combos and lists.


Creates the Hash of all the pre - computed attributes used by type - ahead look - up combos and lists .
def drop_down_attrs()
    {
      label:                          get_full_name(),
      value:                          id,
      tot_distance:                   total_distance,
      tot_secs:                       esteemed_total_seconds,
      user_name:                      get_user_name(),
      swimmer_level_type_description: get_swimmer_level_type( :i18n_description ),
      swimmer_level_type_alternate:   get_swimmer_level_type( :i18n_alternate )
    }
  end
def drop_down_attrs ( ) { label : get_full_name ( ) , value : id , tot_distance : total_distance , tot_secs : esteemed_total_seconds , user_name : get_user_name ( ) , swimmer_level_type_description : get_swimmer_level_type ( :i18n_description ) , swimmer_level_type_alternate : get_swimmer_level_type ( :i18n_alternate ) } end
Creates the Hash of all the pre-computed attributes used by type-ahead look-up
combos and lists.
Creates the Hash of all the pre - computed attributes used by type - ahead look - up combos and lists .