Thanks radhames - that did the trick!

I now have a view here: /books/131/authors/
And I want to each record to link to something like: /books/131/
authors/3333

    <% @authors.each do |author| %>
       <%= link_to 'author.name', book_author_path(@book, @author) %>
    <% end %>

but that error's with: No route matches
{:action=>"destroy", :controller=>"authors"}

I also tried:

    <%= link_to 'author.name', [...@book, author] %>

Problem is the code keeps linking to /authors/3333, not /books/131/
authors/3333

On Oct 2, 2:01 pm, radhames brito <[email protected]> wrote:
> On Sat, Oct 2, 2010 at 9:10 PM, nobosh <[email protected]> wrote:
> > Updated the author controller with:
>
> >  def new
> >   �...@note = Author.new
>
> What is this? what is note? makes no sense
>
> Now the form is creating what seems like the right URL:
>
>
>
> > <form accept-charset="UTF-8" action="/books/3/authors"
> > class="new_author" id="new_author" method="post">
> > ...
>
> > the action path is not rigth

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