= tabs do = tab '<%= resource.human_name.titleize %>' do = render '<%= resource.view_file_path("form_#{resource.name}").sub('effective/', '') %>', <%= resource.name %>: <%= resource.name %> <%- if resource.nested_resources.present? || resource.instance.respond_to?(:logs_datatable) %> - if <%= resource.name %>.persisted? <%- resource.nested_resources.each do |nested_resource| -%> = tab '<%= nested_resource.plural_name.titleize %>' do = render_datatable(<%= nested_resource.klass.name %>Datatable.new(<%= resource.name %>_id: <%= resource.name %>.id)) <%- end -%> <% end -%> - if <%= resource.name %>.persisted? && <%= resource.name %>.respond_to?(:logs_datatable) = tab 'Logs' do = render_datatable(<%= resource.name %>.logs_datatable)