0
votes

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?

1
what do you have in your rake routes?user745235
I add rake routes to questionbmalets
add update_price to routes :) thanksbmalets

1 Answers

0
votes

you should add the missing route to your routes file

EDIT: add the update_price action to your route file