Forum: Ruby on Rails simple formmail question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe Van D. (Guest)
on 2006-01-24 19:26
(Received via mailing list)
I have a few forms that I'd like users to fill out.  The results of
the form will be sent to a few addresses.

What's the least painless way to do this and keep everything DRY?
There's no database involved.  Ideally, I'd like to email the form
questions with the answers inline.

Seems like using ActionMailer and separate email views would be
overkill in this situation.

Joe
Joe Van D. (Guest)
on 2006-01-25 17:56
(Received via mailing list)
On 1/24/06, Joe Van D. <removed_email_address@domain.invalid> wrote:
> I have a few forms that I'd like users to fill out.  The results of
> the form will be sent to a few addresses.
>
> What's the least painless way to do this and keep everything DRY?
> There's no database involved.  Ideally, I'd like to email the form
> questions with the answers inline.
>
> Seems like using ActionMailer and separate email views would be
> overkill in this situation.

Any ideas?  Or should I use ActionMailer and have ActionMailer views
that duplicate the form information and manually insert the form
answers into the ActionMailer views?
Tom M. (Guest)
on 2006-01-25 20:25
(Received via mailing list)
On Jan 25, 2006, at 7:55 AM, Joe Van D. wrote:

>
> Any ideas?  Or should I use ActionMailer and have ActionMailer views
> that duplicate the form information and manually insert the form
> answers into the ActionMailer views?

Pass down the rendered for into the ActionMailer and attach the HTML to
the email.

--
-- Tom M.
Joe Van D. (Guest)
on 2006-01-25 20:31
(Received via mailing list)
On 1/25/06, Tom M. <removed_email_address@domain.invalid> wrote:
> >> Seems like using ActionMailer and separate email views would be
> >> overkill in this situation.
> >
> > Any ideas?  Or should I use ActionMailer and have ActionMailer views
> > that duplicate the form information and manually insert the form
> > answers into the ActionMailer views?
>
> Pass down the rendered for into the ActionMailer and attach the HTML to
> the email.

Eh, the rendered for?

It would be great if I could send out an email that contained all the
forms contents (and the users) answer to the email addresses.
Joe Van D. (Guest)
on 2006-01-25 20:37
(Received via mailing list)
On 1/25/06, Joe Van D. <removed_email_address@domain.invalid> wrote:
> > >>
> Eh, the rendered for?
>
> It would be great if I could send out an email that contained all the
> forms contents (and the users) answer to the email addresses.

Oh, you mean rendered form?

So,

class Forms < ActionController
  def submit_form
     FormMailer::deliver_form_submission( ... )
  end
end

I'm not sure what ... would be.  Some call to render that would render
the action/view that they were just on?
This topic is locked and can not be replied to.