rubocop: fix various style issues.
This commit is contained in:
@@ -356,7 +356,7 @@ class ApplicationRecord < ActiveRecord::Base
|
||||
def belongs_to_creator(options = {})
|
||||
class_eval do
|
||||
belongs_to :creator, options.merge(class_name: "User")
|
||||
before_validation(on: :create) do |rec|
|
||||
before_validation(on: :create) do |rec|
|
||||
if rec.creator_id.nil?
|
||||
rec.creator_id = CurrentUser.id
|
||||
rec.creator_ip_addr = CurrentUser.ip_addr if rec.respond_to?(:creator_ip_addr=)
|
||||
|
||||
Reference in New Issue
Block a user