Newbie ActionMailer question:
I’ve created a mailer, and am pretty sure I’ve set its parameters
I’ve created a view for that mailer, and am also pretty sure I’ve set
it up correctly.
I can call the mailer and it works right when I put the deliver_ in
another controller or simply on a page.
So all that’s great.
BUT, what I really want to do is have a simple button that, when hit,
will trigger that mailer, passing an :id to it as well.
I can’t figure out how to code the button though. Any ideas?
here’s what’s in the mode:
subject “Your story has been scheduled”
from “[email protected]”
body :story => story
here’s the template (excerpt):
Hi <%= @story.author.name %>
here’s the deliver_ action: Emailer.deliver_scheduled(@story)
Again, all this stuff works but I can’t seem to figure out how to
simply smack a button and send an e-mail. I’m sure it’s something I’m