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 via http://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
-~----------~----~----~----~------~----~------~--~---