Skip to content
Browse files

Trying to fix issue with a customer

  • Loading branch information...
1 parent efd3116 commit 3272d4affe10efb53d7dfdf19e7b3fe6da2543c4 @economysizegeek economysizegeek committed Sep 20, 2012
View
2 Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- insightly (0.2.6)
+ insightly (0.2.7)
activesupport (> 3)
builder (>= 2.0.0)
i18n (> 0)
View
34 lib/insightly/address_helper.rb
@@ -1,22 +1,24 @@
module Insightly
module AddressHelper
def addresses
- return [] if !@data["ADDRESSES"]
- @data["ADDRESSES"].collect {|a| Insightly::Address.build(a)}
- end
- def addresses=(list)
- @data["ADDRESSES"] = list.collect {|a| a.remote_data}
- end
- def add_address(address)
- @data["ADDRESSES"] ||= []
- @data["ADDRESSES"].each do |a|
- if address.same_address?(Insightly::Address.build(a))
+ @data["ADDRESSES"] ||= []
+ @data["ADDRESSES"].collect { |a| Insightly::Address.build(a) }
+ end
- return false
- end
- end
- @data["ADDRESSES"] << address.remote_data
- true
- end
+ def addresses=(list)
+ @data["ADDRESSES"] = list.collect { |a| a.remote_data }
+ end
+
+ def add_address(address)
+ @data["ADDRESSES"] ||= []
+ @data["ADDRESSES"].each do |a|
+ if address.same_address?(Insightly::Address.build(a))
+
+ return false
+ end
+ end
+ @data["ADDRESSES"] << address.remote_data
+ true
+ end
end
end
View
24 lib/insightly/contact_info_helper.rb
@@ -1,16 +1,18 @@
module Insightly
module ContactInfoHelper
def contact_infos
- return [] if !@data["CONTACTINFOS"]
- @data["CONTACTINFOS"].collect {|a| Insightly::ContactInfo.build(a)}
- end
- def contact_infos=(list)
- @data["CONTACTINFOS"] = list.collect {|a| a.remote_data}
- end
- def add_contact_info(contact_info)
- @data["CONTACTINFOS"] ||= []
- @data["CONTACTINFOS"] << contact_info.remote_data
- true
- end
+ @data["CONTACTINFOS"] ||= []
+ @data["CONTACTINFOS"].collect { |a| Insightly::ContactInfo.build(a) }
+ end
+
+ def contact_infos=(list)
+ @data["CONTACTINFOS"] = list.collect { |a| a.remote_data }
+ end
+
+ def add_contact_info(contact_info)
+ @data["CONTACTINFOS"] ||= []
+ @data["CONTACTINFOS"] << contact_info.remote_data
+ true
+ end
end
end
View
2 lib/insightly/link_helper.rb
@@ -1,7 +1,7 @@
module Insightly
module LinkHelper
def links
- return [] if !@data["LINKS"]
+ @data["LINKS"] ||= []
@data["LINKS"].collect {|a| Insightly::Link.build(a)}
end
def links=(list)
View
2 lib/insightly/tag_helper.rb
@@ -1,7 +1,7 @@
module Insightly
module TagHelper
def tags
- return [] if !@data["TAGS"]
+ @data["TAGS"] ||= []
@data["TAGS"].collect {|a| Insightly::Tag.build(a)}
end
def tags=(list)
View
2 lib/insightly/task_link_helper.rb
@@ -1,7 +1,7 @@
module Insightly
module TaskLinkHelper
def task_links
- return [] if !@data["TASKLINKS"]
+ @data["TASKLINKS"] ||= []
@data["TASKLINKS"].collect {|a| Insightly::TaskLink.build(a)}
end
def task_links=(list)

0 comments on commit 3272d4a

Please sign in to comment.
Something went wrong with that request. Please try again.