salesflip-lead_notifications 0.0.0 → 0.0.1
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class LeadNotifications::ControllerHooks < Salesflip::Callback::Base
|
2
|
+
def app_after_filter( controller, context = {} )
|
3
|
+
return unless controller.controller_name == 'leads' && controller.action_name == 'create'
|
4
|
+
LeadNotifications::LeadNotificationMailer.lead_notification(
|
5
|
+
controller.instance_variable_get("@lead")
|
6
|
+
).deliver
|
7
|
+
end
|
8
|
+
end
|
@@ -4,5 +4,16 @@ require 'rails'
|
|
4
4
|
module LeadNotifications
|
5
5
|
class Engine < Rails::Engine
|
6
6
|
engine_name :lead_notifications
|
7
|
+
|
8
|
+
paths.app = 'lib/app'
|
9
|
+
paths.app.controllers = 'lib/app/lead_notifications/controllers'
|
10
|
+
paths.app.views = 'lib/app/lead_notifications/views'
|
11
|
+
paths.app.models = 'lib/app/lead_notifications/models'
|
12
|
+
paths.lib = 'lib/app/lead_notifications/lib'
|
13
|
+
|
14
|
+
initializer 'lead_notifications.init_controller_hooks', :after => :set_load_path do |app|
|
15
|
+
require 'app/lead_notifications/mailers/lead_notification_mailer'
|
16
|
+
require 'app/lead_notifications/lib/controller_hooks'
|
17
|
+
end
|
7
18
|
end
|
8
19
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{salesflip-lead_notifications}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matt Beedle"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-28}
|
13
13
|
s.description = %q{A notification email is sent to all users when a new lead arrives}
|
14
14
|
s.email = %q{matt.beedle@1000jobboersen.de}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
"README",
|
22
22
|
"Rakefile",
|
23
23
|
"VERSION",
|
24
|
+
"lib/app/lead_notifications/lib/controller_hooks.rb",
|
24
25
|
"lib/app/lead_notifications/mailers/lead_notification_mailer.rb",
|
25
26
|
"lib/app/lead_notifications/views/lead_notification_mailer/lead_notification.text.erb",
|
26
27
|
"lib/lead_notifications.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesflip-lead_notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Beedle
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-28 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- README
|
34
34
|
- Rakefile
|
35
35
|
- VERSION
|
36
|
+
- lib/app/lead_notifications/lib/controller_hooks.rb
|
36
37
|
- lib/app/lead_notifications/mailers/lead_notification_mailer.rb
|
37
38
|
- lib/app/lead_notifications/views/lead_notification_mailer/lead_notification.text.erb
|
38
39
|
- lib/lead_notifications.rb
|