lib/pipedrive/person.rb in pipedrive_api_rb-1.0.2 vs lib/pipedrive/person.rb in pipedrive_api_rb-1.0.4
- old
+ new
@@ -12,10 +12,11 @@
params = args.extract_options!
params[:term] ||= args[0]
raise 'term is missing' unless params[:term]
params[:fields] ||= args[1]
- return to_enum(:search, params) unless block_given?
+ params.delete :fields if params[:fields].blank?
+ return to_enum(:search, params) unless block
follow_pagination(:make_api_call, [:get, 'search'], params, &block)
end
end
end