I had my answer on another forum.
The issue came from the line
building.resources :blocks
To be deleted (duplicate with the second line)
On Jun 10, 2:47 pm, Tranquiliste
<nico...-y4fycU/S73DV4ymnR38j3w@public.gmane.org>
wrote:> Hello,
>
> Hello, I have an issue when I try to setup a new action in my
> resources.
> I have the following definition in my routes.rb file where I try to
> add the "validate" action
>
> map.resources :buildings do |building|
> building.resources :blocks
> building.resources :blocks, :collection => {:validate => :get}
> end
> Whwn I exucute the rake route, I get as expected :
> validate_building_blocks GET /buildings/:building_id/blocks/
> validate {:controller=>"blocks",
:action=>"validate"}
>
> I have in my view, the following link:
> <%= link_to("#{custom_message(:building_step_3)}",
> validate_building_blocks_path(@building)) %>
>
> But when I click on it, it tries to execute the "show" action of
the
> "block" controller
>
> Do you know what I am doing wrong?
> I use rails 2.0.2
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---