After some time off Rails, i am creating a 3.1 rails project now. I pasted some code from a previous project to create a link_to that posts a value, but i can't get to have the correct behaviour for some reason, and i don't see why. The link_to is (building_controller):
<%= link_to "Upgrade", upgrade_building_path(:id => construction.building.id), :method => :post %>
ROUTE :
scope :path => '/building', :controller => :building do
post 'upgrade' => :upgrade, :as => 'upgrade_building'
end
This actually gives me a :
No route matches [GET] "/building/upgrade"
Any ideas why ?