Method: Interview::View#tooltip

Defined in:
lib/interview/controls/view.rb

#tooltipObject



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/interview/controls/view.rb', line 41

def tooltip
  defaults = @object.class.lookup_ancestors.map do |klass|
    klass.name.underscore.to_sym
  end
  defaults << ''
  
  options = { :scope => [@object.class.i18n_scope, :model_tooltips], :default => defaults }
  return I18n.translate(defaults.shift, options)
  
  # return h.t("activerecord.model_tooltips.#{@object.class.name.underscore}", default: '')
  # todo: tooltip von Elternelement verwenden, falls nicht vorhanden.
end