Susanne P. wrote in post #967430:
> Hey everyone,
>
> I have to define a new function(called it "send") in my
> controller(newsletter_controller.rb). In the routes.rb I added the
> following line
> match 'newsletters/send' => 'newsletters#show', :as => :send
>
> and in the html.erb I try to use the action send by:
> <%= link_to 'Send Newsletter', :action => :send %>
>
> Everything is in the same controller(newsletters) however the error
> occures No route matches {:action=>"send", :controller=>"newsletters"}
>
>
>
> Do I have to tell Rails that there is a new function in the controller?
> Because it looks like Rails just can't find the function send...Does the send method exist yet? > Is the match correct? I'm not really sure about the syntax of it and > which element means what... http://railsapi.com/doc/rails-v3.0.1/classes/ActionDispatch/Routing.html > > Thanks for help! Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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.

