Sha256: 62f5191f0fb1abde80bc56629ad39dd84ea9a0aa767939457e8f39f554d2d4e7
Contents?: true
Size: 1.05 KB
Versions: 14
Compression:
Stored size: 1.05 KB
Contents
<% rtc_controller_name = params[:rtc_controller_name].presence || controller_name %> <% controller_name_singular = rtc_controller_name.singularize %> <% @controller_name = instance_variable_get("@#{controller_name_singular}") %> <% partial = params[:rtc_partial].presence || controller_name_singular %> <% partial_variable = partial.split('/').last %> var $new_item = $('<%= j(render partial, partial_variable.to_sym => @controller_name, rtc_partial: partial_variable) %>').st_formatRow().addClass('updated'); // copy row number $row_number = $('.lvr_entry_edited').find('.rtc_row_number').html(); $new_item.find('.rtc_row_number').html($row_number); // update (insert new, remove old) $('.lvr_entry_edited').after($new_item).remove(); $('.lvr_entry_edited').removeClass('lvr_entry_edited'); $('.modal').modal('hide'); <% if flash[:error].present? %> showGlobalNotification('<%= flash[:error] %>', {type: ERROR}); <% else %> showGlobalNotification('<%= flash[:notice] %>', {type: SUCCESS}); <% end %> <% flash[:error].try(:clear) %> <% flash[:notice].try(:clear) %>
Version data entries
14 entries across 14 versions & 1 rubygems