class Interview::NestedFormRemoveLink

Public Instance Methods

build(b) click to toggle source
# File lib/interview/controls/nested_form_remove_link.rb, line 4
def build(b)
  assoc_object = find_attribute! :assoc_object
  assoc_method = find_attribute!(:assoc_method).to_s
  text = h.t('views.nested_form_remove', association: assoc_object.class.human_attribute_name(assoc_method.singularize)) # todo: in view auslagern
  b.link caption: text, url: '#', html_class: 'nested_form_remove_link'
end