ol.breadcrumb li = link_to "Auditoria", auditoria_index_path, class: "link_breadcrumb" li.active = @log.id li.active | Detalhes div style="margin-bottom: 15px;" = link_to auditoria_index_path, :class => "btn btn-default btn-sm", title: 'Voltar' do i.icone-voltar(style="font-style:normal;") ' Voltar section.widget .widget-body - if @log.usuario p strong Usuário: =< @log.usuario.nome_completo =< "(#{@log.usuario.nome_de_usuario})" if @log.usuario.nome_de_usuario p strong E-mail do Usuário: =< @log.usuario.email p strong Perfil do Usuário: =< @log.usuario.perfil.nome p strong IP: =< @log.ip p strong Browser: =< @log.user_agent p strong Ação: =< t @log.event p strong Objeto: =< @log.item_type | ( id: #{t @log.item_id} ) p strong Horário: =< @log.created_at .table-responsive table.table.table-hover thead tr th Campo - if (t @log.event) != 'Cadastro' th Antes - if (t @log.event) != 'Exclusão' th Depois tbody - if (t @log.event) != 'Exclusão' - campos = @log.object_changes.except( 'created_at', 'updated_at' ) if @log.object_changes - campos ||= {} - campos.each_key do |campo| - valor_antigo = @log.object_changes[campo].first - valor_novo = @log.object_changes[campo].second - next if valor_antigo.blank? & valor_novo.blank? tr td= campo - if (t @log.event) != 'Cadastro' td= valor_antigo.blank? ? '(em branco)' : valor_antigo td= valor_novo.blank? ? '(em branco)' : valor_novo - else - campos = @log.object.except( 'created_at', 'updated_at' ) - campos ||= {} - campos.each_key do |campo| - valor_antigo = @log.object[campo] - next if valor_antigo.blank? tr td= campo td= valor_antigo