Skip to content

Commit

Permalink
Paths now have optional id argument
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrooks committed Mar 22, 2015
1 parent 259eadc commit c643bb3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/closeio/resources/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def delete_contact(id)

private

def contact_path(id)
def contact_path(id=nil)
id ? "contact/#{id}/" : "contact/"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/closeio/resources/lead_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/closeio/resources/opportunity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def delete_opportunity(id)

private

def opportunity_path(id)
def opportunity_path(id=nil)
id ? "opportunity/#{id}/" : "opportunity/"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/closeio/resources/opportunity_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/closeio/resources/smart_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/closeio/resources/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def delete_task(id)

private

def task_path(id)
def task_path(id=nil)
id ? "task/#{id}/" : "task/"
end

Expand Down

0 comments on commit c643bb3

Please sign in to comment.