On Thu, Dec 9, 2010 at 11:48 AM, Susanne P. <[email protected]> wrote:

> In my controller in the function send is a method to send Newsletters
> via email. In show.html.erb the newsletter is shown to the administrator
> who is able to send it, by clicking on a button "Send Newsletter".
>
> > What is that you are trying to achieve? because you appear to be wanting
> > to point to a send action in the controller
>
> I thought it would be nice to see the Newsletter again after it was
> sent.
> I hope this answers your questions.
>
>
kind of does. first if you want to point to an action you should do

resources :newsletters do
   get 'send', :on => :member
end

if the controller is restful it should be

this will create something like

newsletters/:id/send

in the controller inside the send action redirect to the show action at the
end to show the news letter

-- 
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.

Reply via email to