Sha256: 9a1e3648cbbbeab3c93a228a8ad25efffb7051429cbe4610ffb96fda721f54d5

Contents?: true

Size: 728 Bytes

Versions: 7

Compression:

Stored size: 728 Bytes

Contents

<% if object.errors.any? %>
<% pass_through_locals ||= {} %>
$(".<%= singular %>-table tr[data-id=<%= object.id %>][data-edit='true']").html("<%= j render(partial: '#{controller.namespace}errors', locals: {resource: object}) %><%= j render partial: 'edit', locals: {singular.to_sym => object, url: url, colspan: controller.default_colspan}.merge(pass_through_locals || {}) %>")
$(".flash-notices").html("<%= j render 'layouts/flash_notices' %>");
<% else %>
$(".<%= singular %>-table tr[data-id=<%= object.id %>]:not([data-edit='true'])").replaceWith("<%= j render partial: 'line', locals: {singular.to_sym => object } %>").fadeIn()
$(".<%= singular %>-table tr[data-id=<%= object.id %>][data-edit='true']").remove();
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
common_core_js-0.3.4 app/views/common/_common_update.js.erb
common_core_js-0.3.3 app/views/common/_common_update.js.erb
common_core_js-0.3.2 app/views/common/_common_update.js.erb
common_core_js-0.3.1 app/views/common/_common_update.js.erb
common_core_js-0.3.0 app/views/common/_common_update.js.erb
common_core_js-0.1.1 app/views/common/_common_update.js.erb
common_core_js-0.1.0 app/views/common/_common_update.js.erb