rubocop: fix various style issues.

This commit is contained in:
evazion
2019-12-22 16:21:58 -06:00
parent 09f6a84660
commit 309821bf73
288 changed files with 912 additions and 962 deletions

View File

@@ -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=)