From 87febf71c0798ee6ea49d3953eef6a3ff1614231 Mon Sep 17 00:00:00 2001 From: Esteban Pastorino Date: Wed, 2 Apr 2014 16:22:14 -0400 Subject: [PATCH] Fix Organziation#find_or_create_by_name It was using title. The correct attribute is name. --- lib/pipedrive/organization.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pipedrive/organization.rb b/lib/pipedrive/organization.rb index 5bafd0b..b1874a7 100644 --- a/lib/pipedrive/organization.rb +++ b/lib/pipedrive/organization.rb @@ -12,9 +12,9 @@ def deals class << self def find_or_create_by_name(name, opts={}) - find_by_name(name).first || create(opts.merge(:title => name)) + find_by_name(name).first || create(opts.merge(:name => name)) end end end -end \ No newline at end of file +end