Permalink
Browse files

Add gem malone

  • Loading branch information...
rociopaez committed Aug 22, 2014
1 parent 9f44347 commit d98461c94a94f5a9452718dad2bb366cf8bcad47
Showing with 9 additions and 0 deletions.
  1. +4 −0 app.rb
  2. +5 −0 routes/guests.rb
4 app.rb
@@ -1,4 +1,5 @@
require "cuba"
require "malone"
require "mote"
require "mote/render"
require "ohm"
@@ -7,11 +8,14 @@

Ohm.redis = Redic.new("redis://127.0.0.1:6379")

Malone.connect(url: "smtp://localhost:2525", tls: false, domain: "migraine.io")

Cuba.plugin(Mote::Render)
Cuba.plugin(Shield::Helpers)

Dir["./models/**/*.rb"].each { |f| require(f) }
Dir["./filters/**/*.rb"].each { |f| require(f) }
Dir["./services/**/*.rb"].each { |f| require(f) }
Dir["./routes/**/*.rb"].each { |f| require(f) }

Cuba.use Rack::Session::Cookie,
@@ -29,6 +29,11 @@ class Guests < Cuba

authenticate(user)

text = Mailer.render("welcome")

Malone.deliver(from: "info@migraine.io", to: user.email,
subject: "Welcome to Migraine App", text: text)

res.redirect("/dashboard")
end

0 comments on commit d98461c

Please sign in to comment.