Skip to content

Commit

Permalink
fixed bug in new_field when person has no custom fields yet
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffjul authored and numbata committed May 14, 2012
1 parent ca9f920 commit d3fa53b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/highrise/person.rb
Expand Up @@ -54,7 +54,11 @@ def self.tagged_with_id id


def new_field(sfl,sfi) def new_field(sfl,sfi)
sd = SubjectData.new(:subject_field_label => sfl, :value => nil, :subject_field_id => sfi) sd = SubjectData.new(:subject_field_label => sfl, :value => nil, :subject_field_id => sfi)
attributes["subject_datas"] << sd if attributes["subject_datas"]
attributes["subject_datas"] << sd
else
attributes["subject_datas"] = [sd]
end
sd sd
end end


Expand Down

0 comments on commit d3fa53b

Please sign in to comment.