Sha256: 6d5a4a68b1caa1d23c57a023ad7693a799a8ed463349998598f5831a6d5e35f0

Contents?: true

Size: 889 Bytes

Versions: 11

Compression:

Stored size: 889 Bytes

Contents

- Array(local_assigns[:resource_name] ? resource.public_send(resource_name) : resource).each do |resource|
  - resource_to_s = (resource.public_send(resource_to_s) if local_assigns[:resource_to_s])
  - resource_to_s ||= (instance_exec(resource, datatable, &format_each).html_safe if local_assigns[:format_each])
  - resource_to_s ||= resource.to_s

  - if resource_to_s.present?
    .col-resource_item
      - if edit_action && EffectiveDatatables.authorized?(controller, :edit, resource) && (path = effective_resource.action_path(:edit, resource)).present?
        = link_to resource_to_s, path, title: resource_to_s
      - elsif show_action && EffectiveDatatables.authorized?(controller, :show, resource) && (path = effective_resource.action_path(:show, resource)).present?
        = link_to resource_to_s, path, title: resource_to_s
      - else
        = resource_to_s.to_s.html_safe

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
effective_datatables-4.32.0 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.31.4 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.31.3 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.31.2 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.31.1 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.31.0 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.30.2 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.30.1 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.30.0 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.29.0 app/views/effective/datatables/_resource_column.html.haml
effective_datatables-4.26.0 app/views/effective/datatables/_resource_column.html.haml