Re: Button to trigger mailer?

rorra
2009-07-17T04:54:44Z

Use this

<%= link_to_remote ''send scheduling
e-mail'', {:action =>
''scheduled'', :id => story} %>

and then make a .rjs view to render the part of the page you need...

remember to use the :href attribute and propier view if you want to
make it work when js is disabled

Thank you

Rodrigo Dominguez

On 16 jul, 23:48, sinker
<dansin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> My god, I think I was massively inarticulate in that previous post.
> Apologies.
>
> Here''s the thing:
>
> I can successfully send an e-mail through all of the above by simply
> calling it like this:
>
> <%= link_to ''send scheduling
e-mail'', {:action =>
> ''scheduled'', :id => story} %>
>
> BUT, after it sends an e-mail, it wants to go to a view called
> scheduled in the controller it''s currently in. Which
doesn''t exist.
>
> I don''t want it to go anywhere. Just send the e-mail, and maybe
flash
> that it sent.
>
> THAT''S my question.
>
> Thanks so much,
>
> Dan