Sha256: 681c373cedf565c39d14300c8099f1b7e5e12e254a012689c80980dec6ff712c

Contents?: true

Size: 806 Bytes

Versions: 16

Compression:

Stored size: 806 Bytes

Contents

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

.row
  .col-8
    %h1= @page_title
  .col-4.text-right
    = render_resource_actions(resource.klass, 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

16 entries across 16 versions & 1 rubygems

Version Path
effective_resources-1.0.13 app/views/application/index.html.haml
effective_resources-1.0.12 app/views/application/index.html.haml
effective_resources-1.0.11 app/views/application/index.html.haml
effective_resources-1.0.10 app/views/application/index.html.haml
effective_resources-1.0.9 app/views/application/index.html.haml
effective_resources-1.0.8 app/views/application/index.html.haml
effective_resources-1.0.7 app/views/application/index.html.haml
effective_resources-1.0.6 app/views/application/index.html.haml
effective_resources-1.0.5 app/views/application/index.html.haml
effective_resources-1.0.4 app/views/application/index.html.haml
effective_resources-1.0.3 app/views/application/index.html.haml
effective_resources-1.0.2 app/views/application/index.html.haml
effective_resources-1.0.1 app/views/application/index.html.haml
effective_resources-1.0.0 app/views/application/index.html.haml
effective_resources-0.10.1 app/views/application/index.html.haml
effective_resources-0.10.0 app/views/application/index.html.haml