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.
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-24 18: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
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-25 16:56
(Received via mailing list)
On 1/24/06, Joe Van Dyk <joevandyk@gmail.com> 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?
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-01-25 19:25
(Received via mailing list)
On Jan 25, 2006, at 7:55 AM, Joe Van Dyk 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 Mornini
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-25 19:31
(Received via mailing list)
On 1/25/06, Tom Mornini <tmornini@infomania.com> 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.
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-25 19:37
(Received via mailing list)
On 1/25/06, Joe Van Dyk <joevandyk@gmail.com> 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.