Sha256: 30ee109bfef65f5b684a428c1f21c3463995485ff525358efa75ba50bdb62783

Contents?: true

Size: 1.26 KB

Versions: 11

Compression:

Stored size: 1.26 KB

Contents

- if false # disable user log due to performance issues
  - unless params[:action] === 'new'
    main.content#user_log_section
      h2 User Log
      table
        thead
          tr
            th Session
            th User
            th Modified
        tbody
          - if item.versions.present?

            - compared_attributes = item.attributes
            - item.versions.reverse.each do |version|
              ruby:
                changed = []
                if version.event === 'create'
                  changed << "created"
                else
                  excluded = ['updated_at']
                  compared_attributes.each do |attribute, value|
                    changed.push(attribute) unless excluded.include?(attribute) || value.to_s == PaperTrail.serializer.load(version.object)[attribute].to_s
                  end
                  compared_attributes = PaperTrail.serializer.load(version.object)
                end

              - if changed.present?
                tr
                  td = version.created_at
                  td = version.user.present? ? version.user.full_name : content_tag(:em, "user no longer exists")
                  td = changed.join(', ')

          - else
            tr
              td colspan="3" No logs available.

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
fae-railsz-2.1.0 app/views/fae/application/_user_log.html.slim
fae-rails-2.0.0 app/views/fae/application/_user_log.html.slim
fae-rails-1.7.1 app/views/fae/application/_user_log.html.slim
fae-rails-1.7.0 app/views/fae/application/_user_log.html.slim
fae-rails-1.6.0 app/views/fae/application/_user_log.html.slim
fae-rails-1.5.1 app/views/fae/application/_user_log.html.slim
fae-rails-1.5.0 app/views/fae/application/_user_log.html.slim
fae-rails-1.4.1 app/views/fae/application/_user_log.html.slim
fae-rails-1.4.0 app/views/fae/application/_user_log.html.slim
fae-rails-1.3.1 app/views/fae/application/_user_log.html.slim
fae-rails-1.3.0 app/views/fae/application/_user_log.html.slim