Applied rubocop cop 'Style/WordArray'.
This commit is contained in:
parent
1806193619
commit
b9b39014ae
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ returns
|
||||||
list.each {|model_class, model_attributes|
|
list.each {|model_class, model_attributes|
|
||||||
references[:model][model_class.to_s] = 0
|
references[:model][model_class.to_s] = 0
|
||||||
next if !model_attributes[:attributes]
|
next if !model_attributes[:attributes]
|
||||||
['created_by_id', 'updated_by_id'].each {|item|
|
%w(created_by_id updated_by_id).each {|item|
|
||||||
if model_attributes[:attributes].include?(item)
|
if model_attributes[:attributes].include?(item)
|
||||||
count = model_class.where("#{item} = ?", object_id).count
|
count = model_class.where("#{item} = ?", object_id).count
|
||||||
next if count == 0
|
next if count == 0
|
||||||
|
|
|
@ -6,7 +6,7 @@ class ModelTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
# create base
|
# create base
|
||||||
groups = Group.where( name: 'Users' )
|
groups = Group.where( name: 'Users' )
|
||||||
roles = Role.where( name: ['Agent', 'Admin'] )
|
roles = Role.where( name: %w(Agent Admin) )
|
||||||
agent1 = User.create_or_update(
|
agent1 = User.create_or_update(
|
||||||
login: 'model-agent1@example.com',
|
login: 'model-agent1@example.com',
|
||||||
firstname: 'Model',
|
firstname: 'Model',
|
||||||
|
|
Loading…
Reference in a new issue