Sha256: cc7105133cdc5ff632ee582928f4b57f99bd4ededdb4242b769d7c15a5c9150e
Contents?: true
Size: 960 Bytes
Versions: 12
Compression:
Stored size: 960 Bytes
Contents
- resource = (@_effective_resource || Effective::Resource.new(controller_path)) .row .col-xs-8 %h1= @page_title .col-xs-4.text-right - if EffectiveResources.authorized?(controller, :new, resource.klass) && (path = resource.action_path(:new)).present? = link_to "New #{resource.human_name.titleize}", path, class: 'btn btn-primary' - 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
12 entries across 12 versions & 1 rubygems