glengarry 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,12 @@ module Glengarry
|
|
14
14
|
obj.set_reversed_location(results)
|
15
15
|
end
|
16
16
|
|
17
|
-
after_validation :full_geocode
|
17
|
+
after_validation :full_geocode, :generate_activation_token
|
18
|
+
|
19
|
+
def self.activate
|
20
|
+
self.active = true
|
21
|
+
save!
|
22
|
+
end
|
18
23
|
|
19
24
|
def set_reversed_location(results)
|
20
25
|
if geo = results.first
|
@@ -29,6 +34,10 @@ module Glengarry
|
|
29
34
|
geocode
|
30
35
|
reverse_geocode
|
31
36
|
end
|
37
|
+
|
38
|
+
def generate_activation_token
|
39
|
+
self.activation_token = rand(36**12).to_s(36)
|
40
|
+
end
|
32
41
|
end
|
33
42
|
|
34
43
|
end
|
@@ -13,6 +13,7 @@
|
|
13
13
|
<th>Long</th>
|
14
14
|
<th>City</th>
|
15
15
|
<th>Country</th>
|
16
|
+
<th>Active</th>
|
16
17
|
<th></th>
|
17
18
|
</tr>
|
18
19
|
|
@@ -25,6 +26,7 @@
|
|
25
26
|
<td><%= email_lead.long %></td>
|
26
27
|
<td><%= email_lead.city %></td>
|
27
28
|
<td><%= email_lead.country %></td>
|
29
|
+
<td><%= email_lead.active %></td>
|
28
30
|
<td><%= link_to 'Destroy', email_lead, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
29
31
|
</tr>
|
30
32
|
<% end %>
|
data/lib/glengarry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glengarry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- app/views/layouts/glengarry/application.html.erb
|
153
153
|
- config/routes.rb
|
154
154
|
- db/migrate/20120804175235_create_glengarry_email_leads.rb
|
155
|
+
- db/migrate/20121001002851_add_active_and_activation_token_to_email_leads.rb
|
155
156
|
- lib/email_validator.rb
|
156
157
|
- lib/glengarry/engine.rb
|
157
158
|
- lib/glengarry/version.rb
|
@@ -174,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
175
|
version: '0'
|
175
176
|
segments:
|
176
177
|
- 0
|
177
|
-
hash: -
|
178
|
+
hash: -4393915523374264594
|
178
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
180
|
none: false
|
180
181
|
requirements:
|
@@ -183,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
184
|
version: '0'
|
184
185
|
segments:
|
185
186
|
- 0
|
186
|
-
hash: -
|
187
|
+
hash: -4393915523374264594
|
187
188
|
requirements: []
|
188
189
|
rubyforge_project:
|
189
190
|
rubygems_version: 1.8.23
|