From c643bb359d29f21c0b98b526a7c878adf01f8f22 Mon Sep 17 00:00:00 2001 From: Taylor Brooks Date: Sun, 22 Mar 2015 15:39:48 -0500 Subject: [PATCH] Paths now have optional id argument --- lib/closeio/resources/contact.rb | 2 +- lib/closeio/resources/lead_status.rb | 2 +- lib/closeio/resources/opportunity.rb | 2 +- lib/closeio/resources/opportunity_status.rb | 2 +- lib/closeio/resources/smart_view.rb | 2 +- lib/closeio/resources/task.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/closeio/resources/contact.rb b/lib/closeio/resources/contact.rb index c76734f..97d385f 100644 --- a/lib/closeio/resources/contact.rb +++ b/lib/closeio/resources/contact.rb @@ -24,7 +24,7 @@ def delete_contact(id) private - def contact_path(id) + def contact_path(id=nil) id ? "contact/#{id}/" : "contact/" end diff --git a/lib/closeio/resources/lead_status.rb b/lib/closeio/resources/lead_status.rb index a74bc3f..1a21743 100644 --- a/lib/closeio/resources/lead_status.rb +++ b/lib/closeio/resources/lead_status.rb @@ -20,7 +20,7 @@ def delete_lead_status(id) private - def lead_status_path(id) + def lead_status_path(id=nil) id ? "status/lead/#{id}/" : "status/lead/" end diff --git a/lib/closeio/resources/opportunity.rb b/lib/closeio/resources/opportunity.rb index 1cc123c..cb064a4 100644 --- a/lib/closeio/resources/opportunity.rb +++ b/lib/closeio/resources/opportunity.rb @@ -24,7 +24,7 @@ def delete_opportunity(id) private - def opportunity_path(id) + def opportunity_path(id=nil) id ? "opportunity/#{id}/" : "opportunity/" end diff --git a/lib/closeio/resources/opportunity_status.rb b/lib/closeio/resources/opportunity_status.rb index 6ad078a..63d28e4 100644 --- a/lib/closeio/resources/opportunity_status.rb +++ b/lib/closeio/resources/opportunity_status.rb @@ -20,7 +20,7 @@ def delete_opportunity_status(id) private - def opportunity_status_path(id) + def opportunity_status_path(id=nil) id ? "status/opportunity/#{id}/" : "status/opportunity/" end diff --git a/lib/closeio/resources/smart_view.rb b/lib/closeio/resources/smart_view.rb index 5f3b0ab..0fecfcd 100644 --- a/lib/closeio/resources/smart_view.rb +++ b/lib/closeio/resources/smart_view.rb @@ -24,7 +24,7 @@ def delete_smart_view(id) private - def smart_view_path(id) + def smart_view_path(id=nil) id ? "saved_search/#{id}/" : "saved_search/" end diff --git a/lib/closeio/resources/task.rb b/lib/closeio/resources/task.rb index c31d611..1c08bf2 100644 --- a/lib/closeio/resources/task.rb +++ b/lib/closeio/resources/task.rb @@ -24,7 +24,7 @@ def delete_task(id) private - def task_path(id) + def task_path(id=nil) id ? "task/#{id}/" : "task/" end