Thanks for the responses!
link_to_remote doesn't seem to do anything. Looking at the terminal
window when I hit it, it just reloads the page. I change it back to
link_to and the terminal does all the e-mail song & dance. Am I
missing a step with link_to_remote?
And render :nothing => true gets rid of the page not found error, but
instead simply displays a blank page once the e-mail has been sent.
Hrm...
On Jul 16, 11:57 pm, Rodrigo Dominguez <rails-mailing-l...@andreas-
s.net> wrote:
> sinker 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 '<span>send scheduling e-mail</span>', {: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
>
> You can use
>
> <%= link_to_remote '<span>send scheduling e-mail</span>', {:action =>
> 'scheduled', :id => story} %>
>
> and then in the controller you can update the div of the current page
> with a ok message or a error message
>
> be sure to use the :href attribute and make a view answer for that
> action in order to support js disabled
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---