audits1984 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/helpers/audits1984/application_helper.rb +8 -0
- data/app/views/audits1984/sessions/_header.html.erb +1 -1
- data/lib/audits1984/version.rb +1 -1
- data/lib/audits1984.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb0886dcdc77043ac74450f624f7d02ab7360a969aa94178b40ae33a260a5c28
|
4
|
+
data.tar.gz: 685b9be01f924518abf626b94262e5dabd28240280d0430a7504240957ffa210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96a3cf3e7a98ac2e235de4ef3c7c9fb4cb01693802664bbdeb559946d1514f8f77d9985f67280a0aa006349d3edac747bbdebd1a32efdf88218541b790e5cf89
|
7
|
+
data.tar.gz: 6c0cd031a25dfcb7e5354a58b60d39792d5df44c7d3a197c400fdc9420117d73f63655287647bbd83b4b26b155f66a9ce53a09b4e2b2f1462729c46f4ed02350
|
data/README.md
CHANGED
@@ -60,5 +60,5 @@ These config options are namespaced in `config.audits1984`:
|
|
60
60
|
| Name | Description |
|
61
61
|
| --------------------- | ------------------------------------------------------------ |
|
62
62
|
| auditor_class | The name of the auditor class. By default it's `::User.` |
|
63
|
+
| auditor_name_attribute | The attribute on the auditor class that returns the auditor's name. By default it's `:name`. |
|
63
64
|
| base_controller_class | The host application base class that will be the parent of `audit1984` controllers. By default it's `::ApplicationController`. |
|
64
|
-
|
@@ -2,6 +2,14 @@ require "rouge"
|
|
2
2
|
|
3
3
|
module Audits1984
|
4
4
|
module ApplicationHelper
|
5
|
+
def auditor_name_for(auditor)
|
6
|
+
if auditor == Audits1984::Current.auditor
|
7
|
+
"You"
|
8
|
+
else
|
9
|
+
auditor.public_send(Audits1984.auditor_name_attribute)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
5
13
|
def format_date(date)
|
6
14
|
# <time datetime="2016-1-1">11:09 PM - 1 Jan 2016</time>
|
7
15
|
date.strftime("%Y-%m-%d")
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<ul class="mb-6">
|
7
7
|
<% session.audits.except(&:new_record?).each do |audit| %>
|
8
8
|
<li> <%= audit.status.humanize %>
|
9
|
-
by <%= audit.auditor
|
9
|
+
by <%= auditor_name_for(audit.auditor) %>
|
10
10
|
on <%= format_date_and_time(audit.created_at) %>
|
11
11
|
</li>
|
12
12
|
<% end %>
|
data/lib/audits1984/version.rb
CHANGED
data/lib/audits1984.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: audits1984
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jorge Manrubia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rouge
|