Im trying to override devise in order to send mail to activate a user. In the create method in the registrations controller i have this
urlEmail = resource.email.sub('@','-')
Pony.mail(
:to => resource.email,
:from => "noreply@mysite.com",
:subject => "Confirm Account",
:headers => { 'Content-Type' => 'text/html' },
:body => ("<h1>Welcome To My Awesome Site</h1>
<p>follow this link to create your account</p>
<p>http://localhost:3000/confirm-me/stuff?=" + resource.confirmhash.to_s + "/" + urlEmail.to_s + "</p>") )
This url leads to a method to activate the user. Whether this is a good way to confirm an account is beside the point. The problem is that when the Pony.mail(...) runs i get this error
uninitialized constant RegistrationsController::Pony
i have installed pony and Pony.mail works in the console. I also tried using require 'pony' in the top of the controller file but i get
no such file to load -- pony
What do i need to do to make this work.