Sha256: 59cfa1a0405d8b297c2fd8a25680fc3daf38efe2d061c60b617f39afe94714a0

Contents?: true

Size: 822 Bytes

Versions: 326

Compression:

Stored size: 822 Bytes

Contents

- resource = (@_effective_resource || Effective::Resource.new(controller_path))

.row
  .col-8
    %h1= @page_title
  .col-4.text-right
    = render_resource_buttons(resource.klass, (action ||= :index) => false)

- if @datatable
  = render_datatable(@datatable)

- elsif instance_variable_get('@' + resource.plural_name).respond_to?(:to_partial_path)
  = render instance_variable_get('@' + resource.plural_name)

- elsif instance_variable_get('@' + resource.name).respond_to?(:to_partial_path)
  = render instance_variable_get('@' + resource.name)

- elsif Rails.env.development?
  %p effective_resources index view is not sure what to render.
  %p Define an @datatable, @#{resource.try(:plural_name) || 'a plural'}, or @#{resource.try(:name) || 'a singular'}.
  %p or include Effective::CrudController in your controller

Version data entries

326 entries across 326 versions & 1 rubygems

Version Path
effective_resources-2.27.3 app/views/application/index.html.haml
effective_resources-2.27.2 app/views/application/index.html.haml
effective_resources-2.27.1 app/views/application/index.html.haml
effective_resources-2.27.0 app/views/application/index.html.haml
effective_resources-2.26.5 app/views/application/index.html.haml
effective_resources-2.26.4 app/views/application/index.html.haml
effective_resources-2.26.3 app/views/application/index.html.haml
effective_resources-2.26.2 app/views/application/index.html.haml
effective_resources-2.26.1 app/views/application/index.html.haml
effective_resources-2.26.0 app/views/application/index.html.haml
effective_resources-2.25.16 app/views/application/index.html.haml
effective_resources-2.25.15 app/views/application/index.html.haml
effective_resources-2.25.14 app/views/application/index.html.haml
effective_resources-2.25.13 app/views/application/index.html.haml
effective_resources-2.25.12 app/views/application/index.html.haml
effective_resources-2.25.11 app/views/application/index.html.haml
effective_resources-2.25.10 app/views/application/index.html.haml
effective_resources-2.25.9 app/views/application/index.html.haml
effective_resources-2.25.8 app/views/application/index.html.haml
effective_resources-2.25.7 app/views/application/index.html.haml