Module: LabelsHelper

Defined in:
app/helpers/labels_helper.rb

Instance Method Summary (collapse)

Instance Method Details



9
10
11
12
13
14
15
16
# File 'app/helpers/labels_helper.rb', line 9

def label_link(label)
  return nil if label.nil?
  if label.label_object_id.blank?
    taxonworks_label_tag(label)
  else
    link_to((:span, label.text), label.object_global_id) # TODO: properly reference style
  end
end

- (Object) taxonworks_label_tag(label)

!! Note that `label_tag` is a Rails reserved word, so we have to append and make exceptions



4
5
6
7
# File 'app/helpers/labels_helper.rb', line 4

def taxonworks_label_tag(label)
  return nil if label.nil?
  (:span, label.text) # TODO: properly reference style
end