lib/sugarcrm/attribute_methods.rb in sugarcrm-0.7.2 vs lib/sugarcrm/attribute_methods.rb in sugarcrm-0.7.7
- old
+ new
@@ -1,13 +1,15 @@
module SugarCRM; module AttributeMethods
- # Returns a hash of the module fields from the
- def attributes_from_module_fields
- fields = {}
- self.class._module.fields.keys.sort.each do |k|
- fields[k.to_s] = nil
+ module ClassMethods
+ # Returns a hash of the module fields from the module
+ def attributes_from_module_fields
+ fields = {}
+ self._module.fields.keys.sort.each do |k|
+ fields[k.to_s] = nil
+ end
+ fields
end
- fields
end
# Generates get/set methods for keys in the attributes hash
def define_attribute_methods
return if attribute_methods_generated?
\ No newline at end of file