Corrected with rubocop cop 'Style/MethodName'.
This commit is contained in:
parent
b1d8fb1434
commit
abe329591e
4 changed files with 6 additions and 8 deletions
|
@ -271,7 +271,5 @@ Lint/Eval:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Rails/HasAndBelongsToMany:
|
Rails/HasAndBelongsToMany:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/MethodName:
|
|
||||||
Enabled: false
|
|
||||||
Style/ModuleFunction:
|
Style/ModuleFunction:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -7,7 +7,7 @@ class ObjectManagerAttributesController < ApplicationController
|
||||||
def list
|
def list
|
||||||
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
||||||
render json: {
|
render json: {
|
||||||
objects: ObjectManager.listFrontendObjects,
|
objects: ObjectManager.list_frontend_objects,
|
||||||
}
|
}
|
||||||
#model_index_render(ObjectManager::Attribute, params)
|
#model_index_render(ObjectManager::Attribute, params)
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,11 +6,11 @@ class ObjectManager
|
||||||
|
|
||||||
list all backend managed object
|
list all backend managed object
|
||||||
|
|
||||||
ObjectManager.listObjects()
|
ObjectManager.list_objects()
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.listObjects
|
def self.list_objects
|
||||||
['Ticket', 'TicketArticle', 'User', 'Organization', 'Group' ]
|
['Ticket', 'TicketArticle', 'User', 'Organization', 'Group' ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ list all backend managed object
|
||||||
|
|
||||||
list all frontend managed object
|
list all frontend managed object
|
||||||
|
|
||||||
ObjectManager.listFrontendObjects()
|
ObjectManager.list_frontend_objects()
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.listFrontendObjects
|
def self.list_frontend_objects
|
||||||
['Ticket', 'User', 'Organization' ] #, 'Group' ]
|
['Ticket', 'User', 'Organization' ] #, 'Group' ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ module SessionHelper
|
||||||
|
|
||||||
def self.models(user = nil)
|
def self.models(user = nil)
|
||||||
models = {}
|
models = {}
|
||||||
objects = ObjectManager.listObjects
|
objects = ObjectManager.list_objects
|
||||||
objects.each {|object|
|
objects.each {|object|
|
||||||
attributes = ObjectManager::Attribute.by_object(object, user)
|
attributes = ObjectManager::Attribute.by_object(object, user)
|
||||||
models[object] = attributes
|
models[object] = attributes
|
||||||
|
|
Loading…
Reference in a new issue