mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Story #109367694 - refactor user log string to user for paper trail creator_str
This commit is contained in:
parent
ac04a94b6a
commit
18c643ee8d
2 changed files with 6 additions and 2 deletions
|
@ -67,8 +67,7 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_log_str(user)
|
def user_log_str(user)
|
||||||
return 'public' if user.nil?
|
user.nil? ? 'public' : user.string
|
||||||
"#{user.id}-#{user.class}: #{user.username}"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def comma_support_for(parent_key, key)
|
def comma_support_for(parent_key, key)
|
||||||
|
|
|
@ -3,4 +3,9 @@ class User < ActiveRecord::Base
|
||||||
devise :trackable, :timeoutable
|
devise :trackable, :timeoutable
|
||||||
|
|
||||||
attr_accessor :phone
|
attr_accessor :phone
|
||||||
|
|
||||||
|
def string
|
||||||
|
"#{self.id}-#{self.class}: #{self.username}"
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue