leads_to_highrise 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.rdoc +5 -4
- data/app/controllers/leads_to_highrise/leads_controller.rb +6 -5
- data/app/views/leads_to_highrise/leads/_lead.html.erb +1 -1
- data/app/views/leads_to_highrise/leads/index.html.erb +2 -2
- data/config/routes.rb +9 -2
- data/lib/leads_to_highrise/engine.rb +0 -1
- data/lib/leads_to_highrise/version.rb +1 -1
- data/test/dummy/config/routes.rb +1 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +1726 -0
- data/test/dummy/log/test.log +60 -0
- data/test/leads_to_highrise_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzM2YTg3MzRhYTU4NDg4OTFiMjZjMmEzMThiMTc1YzBmNjY0Yjk4OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjBkZmUwNTFhMzVjMzJlZTdiNzY4Mjc0NjIwZjRhZTQ2NmUxZmY1ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjU5MGEyM2I3MDg1NWI2NWZiZjM5Yjg2YWRhNWUxNTUwYTkxZGY2OTQ3NjFk
|
10
|
+
M2Q0MDE1MDZkODliZjJmYjc1NjY2M2U0YzZlMzIyMjcyOTc0NzM2MDI2NjFh
|
11
|
+
OTc3YjFhYzc4ZjNhNzc4ZTk1OWYxMDhhNmVkZjg5NTRhNjMxY2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjRhMzJiMTk4ZWJhN2EyOTczZWZmZjNmZjkyYjVmNzM3NThlN2MzMmE3ZGJm
|
14
|
+
YzA0MTgzYjM5NjlhNDhjMDMzMWU3NWFlMzk5MTY1MTQ0YzgxODdiZWI3YTdl
|
15
|
+
MzBlMmU5YWZlYTkyZDMyM2U4OGUxMzc4YzE2Y2Y4Nzg1NmI2OGU=
|
data/README.rdoc
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
= LeadsToHighrise
|
2
2
|
|
3
|
-
Use this gem to send
|
3
|
+
Use this gem to send contacts to highrise easily
|
4
4
|
|
5
5
|
=Dependencies
|
6
6
|
*Devise
|
7
7
|
*Highrise gem
|
8
8
|
|
9
|
-
=
|
9
|
+
=How to use
|
10
10
|
*Add the gem
|
11
11
|
````
|
12
12
|
gem 'devise'
|
@@ -14,8 +14,9 @@ gem 'leads_to_higrise'
|
|
14
14
|
```
|
15
15
|
|
16
16
|
*Install Devise and generate a model(LTH uses the 'User' model by default).
|
17
|
-
*Install LTH migrations ```rake ```
|
18
|
-
|
17
|
+
*Install LTH migrations ```rake leadstohighrise:install:migrations``` (this command line is big and confused, i know, i go fix it soon :) )
|
19
18
|
|
19
|
+
*Run```rake db:migrate```
|
20
|
+
*Add ```mount LeadsToHighrise::Engine => "/"``` to ```config/routes.rb```
|
20
21
|
|
21
22
|
This project rocks and uses MIT-LICENSE.
|
@@ -45,6 +45,7 @@ module LeadsToHighrise
|
|
45
45
|
|
46
46
|
# DELETE /leads/1
|
47
47
|
def destroy
|
48
|
+
@lead = Lead.find(params[:id])
|
48
49
|
@lead.destroy
|
49
50
|
redirect_to leads_url, notice: 'Lead was successfully destroyed.'
|
50
51
|
end
|
@@ -61,13 +62,13 @@ module LeadsToHighrise
|
|
61
62
|
Highrise::Base.user = current_user.highrise_user
|
62
63
|
Highrise::Base.format = :xml
|
63
64
|
|
64
|
-
p = Highrise::Person.new( first_name:
|
65
|
-
last_name:
|
66
|
-
title:
|
65
|
+
p = Highrise::Person.new( first_name: @lead[:name],
|
66
|
+
last_name: @lead[:last_name],
|
67
|
+
title: @lead[:job_title],
|
67
68
|
company_name: @lead[:company],
|
68
69
|
contact_data: { email_addresses: [ { address: @lead[:emial]} ],
|
69
|
-
phone:
|
70
|
-
website:
|
70
|
+
phone: @lead[:phone],
|
71
|
+
website: @lead[:website] })
|
71
72
|
|
72
73
|
if p.save
|
73
74
|
redirect_to main_app.root_path
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<td><%= link_to 'Show', lead %></td>
|
28
28
|
<td><%= link_to 'Edit', edit_lead_path(lead) %></td>
|
29
29
|
<td><%= link_to 'Destroy', lead, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
30
|
-
<td><%= link_to 'Send To Highrise', to_highrise_path(lead)
|
30
|
+
<td><%= link_to 'Send To Highrise', to_highrise_path(lead) if user_signed_in? %></td>
|
31
31
|
</tr>
|
32
32
|
<% end %>
|
33
33
|
</tbody>
|
@@ -26,8 +26,8 @@
|
|
26
26
|
<td><%= lead.website %></td>
|
27
27
|
<td><%= link_to 'Show', lead %></td>
|
28
28
|
<td><%= link_to 'Edit', edit_lead_path(lead) %></td>
|
29
|
-
<td><%= link_to 'Destroy', lead, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
30
|
-
<td><%= link_to 'Send To Highrise', to_highrise_path(lead)%></td>
|
29
|
+
<td><%= link_to 'Destroy', delete_lead_path(lead), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
30
|
+
<td><%= link_to 'Send To Highrise', to_highrise_path(lead) if user_signed_in? %></td>
|
31
31
|
</tr>
|
32
32
|
<% end %>
|
33
33
|
</tbody>
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
LeadsToHighrise::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
2
|
+
get '/leads', to: 'leads#index', as: 'leads'
|
3
|
+
post '/leads', to: 'leads#create'
|
4
|
+
get '/leads/new', to: 'leads#new', as: 'new_lead'
|
5
|
+
get '/leads/:id/edit', to: 'leads#edit', as: 'edit_lead'
|
6
|
+
get '/leads/:id', to: 'leads#show', as: 'lead'
|
7
|
+
patch '/leads/:id', to: 'leads#update'
|
8
|
+
put '/leads/:id', to: 'leads#update'
|
9
|
+
get '/leads/:id/delete', to: 'leads#destroy', as: 'delete_lead'
|
10
|
+
get '/leads/to_highrise/:id', to: "leads#to_highrise", as: "to_highrise"
|
4
11
|
end
|
data/test/dummy/config/routes.rb
CHANGED
Binary file
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|