Rails routes and ajax -


i have problem:

my routes:

match 'questions/get_label/:id' => 'questions#get_label'                                ,:as => :question_get_label, :via =>  :post 

my js:

$.ajax({         url: 'questions/get_label/'+id,         type: "post",           success: function(){             //$('.preloader').hide()          }     }); 

server answer:

no route matches [patch] "/questions/get_label/2" 

what miss?


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -