class GlobalRegistryModels::CommonBase
Public Class Methods
attribute_names()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 26 def self.attribute_names attribute_set.collect(&:name) end
default_field()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 42 def self.default_field nil end
filterable_attributes()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 30 def self.filterable_attributes attribute_names - [:id] end
has_meta()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 46 def self.has_meta true end
identifying_attributes()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 34 def self.identifying_attributes [:id] end
title()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 22 def self.title name.titleize end
writeable_attributes()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 38 def self.writeable_attributes attribute_names - [:id] end
Private Class Methods
specific_attributes_preparations(object, attributes)
click to toggle source
# File lib/global_registry_models/common_base.rb, line 56 def self.specific_attributes_preparations(object, attributes) attributes end
Private Instance Methods
underscore_name()
click to toggle source
# File lib/global_registry_models/common_base.rb, line 52 def underscore_name self.name = self.name.downcase.tr(' ','_') if self.name end