Skip to content

Commit

Permalink
Changes for null attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaysingh1980 committed Jun 13, 2013
1 parent 809fbfb commit 06342d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sugarcrm/attributes/attribute_methods.rb
Expand Up @@ -112,7 +112,7 @@ def merge_attributes(attrs={})
def define_attribute_methods
return if attribute_methods_generated?
@attributes.keys.sort.each do |k|
# ajay Singh skip the loop if attribute is null
# ajay Singh --> skip the loop if attribute is null
next if !k.present?
self.class.module_eval %Q?
def #{k}
Expand Down
2 changes: 1 addition & 1 deletion lib/sugarcrm/attributes/attribute_typecast.rb
Expand Up @@ -16,7 +16,7 @@ def attr_type_for(attribute)
def typecast_attributes
@attributes.each_pair do |name,value|
# skip primary key columns
# ajay Singh skip the loop if attribute is null (!name.present?)
# ajay Singh --> skip the loop if attribute is null (!name.present?)
next if (name == "id") or (!name.present?)
attr_type = attr_type_for(name)

Expand Down

0 comments on commit 06342d1

Please sign in to comment.