Sha256: 38b897604ff5e782e5a55e0efd34154ad7f7b8ee8d07cf74c94c82ea508cab70
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
- if object.class.show_associations.map(&:to_s).include? association.name.to_s %tr %td = model_class.human_attribute_name association.name %hr = link_to "#{I18n.t('helpers.actions.add')} #{model_class.human_attribute_name(association.name).singularize.downcase}", new_associated_record_path(association: association, object: object, as: object.send("#{association.name}_as")), class: 'btn btn-primary' %td{ colspan: 2 } %table.table.table-striped.table-bordered - object.send(association.name)&.each do |association_object| %tr{ id: "#{association.name}_#{association_object.id}" } %td = association_object.id %td = link_to association_object.name, record_path(association_object.id, model: association.options[:class_name]) %td = delete_button url: record_path(association_object.id, model: association.options[:class_name], redirect: current_model_record_path(object.id)), button_options: { class: 'btn btn-xs btn-danger' } do = fa_icon 'trash-alt'
Version data entries
5 entries across 5 versions & 1 rubygems