我試圖升級rails 2應用程序到rails 3. 在我的視圖中有一個與observe_form有關的問題。rails 3 observe_form no routes match
<%= observe_form 'lead', :url => { :action => :update_price }, :frequency => 0.1 %>
我在觀看/文件夾和方法的局部_update_price.rjs在控制器:
def update_price
unless request.xhr?
redirect_to :controller => 'index'
else
set_price_group
render :partial => "update_price",
:locals => { :services => params[:service],
:spectr => params[:spectr] }
end
end
這是一個錯誤: 無路由匹配{:行動=> 「update_price」, :控制器=> 「走出去」}
我的路線:
$ rake routes
about /about(.:format) go#about
advantages /advantages(.:format) go#advantages
/:controller/:action/:id(.:format) :controller#:action
/:controller/:action/:id.:format :controller#:action
root / go#index
我該如何解決問題?
你怎麼在你的'耙routes'有哪些? – Gerep 2013-03-24 17:45:07
我將耙路線添加到問題 – bmalets 2013-03-24 18:03:01
將update_price添加到路線:)謝謝 – bmalets 2013-03-24 18:07:33