I'm trying to upgrade rails 2 application to rails 3. An have a problem with observe_form in my view.
<%= observe_form 'lead', :url => { :action => :update_price }, :frequency => 0.1 %>
I have an _update_price.rjs partial in view/ folder and method in controller:
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
This is an error: No route matches {:action=>"update_price", :controller=>"go"}
My Routes:
$ 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
How can I solve the problem?
rake routes
? – user745235