Permalink
Browse files

Make 'provider' optional

  • Loading branch information...
1 parent 0dbd8f8 commit 5ede99e7d18c4c4db6fbd5338d334a2d970f1ffb @haugstrup haugstrup committed Feb 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/podio/models/linked_account.rb
@@ -7,8 +7,9 @@ class Podio::LinkedAccount < ActivePodio::Base
class << self
- def find_all(provider, capability = nil)
- options = { :provider => provider }
+ def find_all(provider = nil, capability = nil)
+ options = {}
+ options[:provider] = provider if provider.present?
options[:capability] = capability if capability.present?
list Podio.connection.get { |req|
req.url("/linked_account/", options)

2 comments on commit 5ede99e

Contributor

RSpace replied Feb 28, 2012

@haugstrup I think we should change this to take just options = {} as an argument - that's more in line with what we do elsewhere, and also prettier when there is more than one optional parameter.

Contributor

haugstrup replied Feb 28, 2012

You are correct, of course. I've made the change

Please sign in to comment.