From ead406c22070cc8da52f5ba227248f00ade72fa9 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 20 Jan 2016 23:03:10 +0100 Subject: [PATCH] Improved doc. --- app/models/object_manager.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/models/object_manager.rb b/app/models/object_manager.rb index 44ca47f94..06ed3ab38 100644 --- a/app/models/object_manager.rb +++ b/app/models/object_manager.rb @@ -43,8 +43,8 @@ list of all attributes result = [ { - :name => 'some name', - :display => '...', + name: 'some name', + display: '...', }. ], @@ -129,8 +129,8 @@ add a new attribute entry for an object get the attribute model based on object and name attribute = ObjectManager::Attribute.get( - :object => 'Ticket', - :name => 'group_id', + object: 'Ticket', + name: 'group_id', ) =end @@ -157,9 +157,9 @@ get user based list of object attributes returns: [ - { :name => 'api_key', :display => 'API KEY', :tag => 'input', :null => true, :edit => true, :maxlength => 32 }, - { :name => 'api_ip_regexp', :display => 'API IP RegExp', :tag => 'input', :null => true, :edit => true }, - { :name => 'api_ip_max', :display => 'API IP Max', :tag => 'input', :null => true, :edit => true }, + { name: 'api_key', display: 'API KEY', tag: 'input', null: true, edit: true, maxlength: 32 }, + { name: 'api_ip_regexp', display: 'API IP RegExp', tag: 'input', null: true, edit: true }, + { name: 'api_ip_max', display: 'API IP Max', tag: 'input', null: true, edit: true }, ] =end @@ -214,9 +214,9 @@ get user based list of object attributes as hash returns: { - 'api_key' => { :name => 'api_key', :display => 'API KEY', :tag => 'input', :null => true, :edit => true, :maxlength => 32 }, - 'api_ip_regexp' => { :name => 'api_ip_regexp', :display => 'API IP RegExp', :tag => 'input', :null => true, :edit => true }, - 'api_ip_max' => { :name => 'api_ip_max', :display => 'API IP Max', :tag => 'input', :null => true, :edit => true }, + 'api_key' => { name: 'api_key', display: 'API KEY', tag: 'input', null: true, edit: true, maxlength: 32 }, + 'api_ip_regexp' => { name: 'api_ip_regexp', display: 'API IP RegExp', tag: 'input', null: true, edit: true }, + 'api_ip_max' => { name: 'api_ip_max', display: 'API IP Max', tag: 'input', null: true, edit: true }, } =end