github
0 of 18 new or added lines in 4 files covered. (0.0%)
3922 existing lines in 105 files now uncovered.0 of 4086 relevant lines covered (0.0%)
0.0 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
UNCOV
3
|
module UserStampable |
× |
4 |
|
|
UNCOV
5
|
extend ActiveSupport::Concern |
× |
6 |
|
|
UNCOV
7
|
included do
|
× |
NEW
|
belongs_to :creator, optional: true, class_name: 'User' |
× |
NEW
|
belongs_to :updater, optional: true, class_name: 'User' |
× |
10 |
|
|
UNCOV
11
|
before_save :set_user_stamps
|
× |
UNCOV
12
|
end
|
× |
13 |
|
|
UNCOV
14
|
private |
× |
15 |
|
|
UNCOV
16
|
def set_user_stamps |
× |
UNCOV
17
|
return unless User.current |
× |
18 |
|
|
NEW
|
self.creator = User.current if new_record? |
× |
NEW
|
self.updater = User.current |
× |
UNCOV
21
|
end
|
× |
22 |
|
|
UNCOV
23
|
end
|
× |