leads_to_highrise 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/leads_controller.rb +21 -17
- data/lib/leads_to_highrise/version.rb +1 -1
- data/test/dummy/log/development.log +24 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmFkMGY1OGIzMmVkN2NjNjQ4YWIxMzM1YWVmMzk1NDFmYzNmM2ZiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2ExMzUxMTQyZDk4MzdlNjAyNjk5ZjllZTFmMDljYmJkMGNhNGMwMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTE1MjQ2Y2MzYTlhYWI4NmFkMWQ0NDk1NmJhOTkwYjdmZThiYzFmYzg1NTEz
|
10
|
+
ODg1NmY0ZTZmZWY3ZDdhZjhhYzY0ODE4MWEwYWQ5NmMxMzc0MTFkY2UzOTFm
|
11
|
+
N2FjNzNmMDdiZmNmNThiYjFiOGUyMDI5ZTBmOGZjNmY4YzBmMzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzU3YWMwYTYwY2QyM2MxOWIyZmM2NDZlYTk3NzAwMjgwNTk0OTk5ZmZkNmNj
|
14
|
+
ZGI0ZGJlZDY3MDJmMjI5YzY1OWE5N2EyNjAxZDhlOWQxYWYxMGI3NzU0MTI4
|
15
|
+
ODYyZDIzZWFlZGRhYTliMTM1ZjExY2E3NmM1MmRjODgzMWM3YTE=
|
@@ -48,24 +48,28 @@ class LeadsController < ApplicationController
|
|
48
48
|
|
49
49
|
def to_highrise
|
50
50
|
@lead = Lead.find(params[:id])
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
51
|
+
if current_user.highrise_site != nil || current_user.highrise_user !=
|
52
|
+
Highrise::Base.site = current_user.highrise_site
|
53
|
+
Highrise::Base.user = current_user.highrise_user
|
54
|
+
Highrise::Base.format = :xml
|
55
|
+
p = Highrise::Person.new( first_name: @lead[:name],
|
56
|
+
last_name: @lead[:last_name],
|
57
|
+
title: @lead[:job_title],
|
58
|
+
company_name: @lead[:company],
|
59
|
+
contact_data: { email_addresses: [ { address: @lead[:emial], location: 'Work'} ],
|
60
|
+
phone: @lead[:phone],
|
61
|
+
website: @lead[:website] })
|
62
|
+
|
63
|
+
#p = Highrise::Person.new(first_name: @lead[:name], contact_data: { email_addresses: [ { address: 'test@example.com', location: 'Work' } ] })
|
64
|
+
|
65
|
+
#p.save
|
66
|
+
if p.save
|
67
|
+
redirect_to root_path, notice: 'The contact has been sended to highrise'
|
68
|
+
else
|
69
|
+
redirect_to root_path, notice: 'Error.'
|
70
|
+
end
|
67
71
|
else
|
68
|
-
redirect_to root_path, notice: '
|
72
|
+
redirect_to root_path, notice: 'Please add your highrise settings'
|
69
73
|
end
|
70
74
|
end
|
71
75
|
|
@@ -2019,3 +2019,27 @@ Started GET "/assets/application.css?body=1" for 10.0.2.2 at 2014-04-17 11:10:29
|
|
2019
2019
|
|
2020
2020
|
|
2021
2021
|
Started GET "/assets/application.js?body=1" for 10.0.2.2 at 2014-04-17 11:10:30 +0000
|
2022
|
+
|
2023
|
+
|
2024
|
+
Started GET "/leads/1/to_highrise" for 10.0.2.2 at 2014-04-17 11:22:07 +0000
|
2025
|
+
[1m[36mActiveRecord::SchemaMigration Load (5.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2026
|
+
Processing by LeadsController#to_highrise as HTML
|
2027
|
+
Parameters: {"id"=>"1"}
|
2028
|
+
[1m[35mLead Load (40.2ms)[0m SELECT "leads".* FROM "leads" WHERE "leads"."id" = ? LIMIT 1 [["id", 1]]
|
2029
|
+
[1m[36mUser Load (9.7ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
2030
|
+
Redirected to http://localhost:3000/
|
2031
|
+
Completed 302 Found in 6862ms (ActiveRecord: 103.7ms)
|
2032
|
+
|
2033
|
+
|
2034
|
+
Started GET "/" for 10.0.2.2 at 2014-04-17 11:22:18 +0000
|
2035
|
+
Processing by LeadsController#index as HTML
|
2036
|
+
[1m[35mLead Load (8.7ms)[0m SELECT "leads".* FROM "leads"
|
2037
|
+
[1m[36mUser Load (25.7ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
2038
|
+
Rendered /vagrant/engine/leads_to_highrise/app/views/leads/index.html.erb within layouts/application (358.7ms)
|
2039
|
+
Completed 200 OK in 1670ms (Views: 1634.7ms | ActiveRecord: 34.4ms)
|
2040
|
+
|
2041
|
+
|
2042
|
+
Started GET "/assets/application.css?body=1" for 10.0.2.2 at 2014-04-17 11:22:21 +0000
|
2043
|
+
|
2044
|
+
|
2045
|
+
Started GET "/assets/application.js?body=1" for 10.0.2.2 at 2014-04-17 11:22:21 +0000
|