javascript

Rails PATCH Method instead of POST  #angularjs #reactjs

  • brands_campaigns GET /campaigns(.:format) brands/campaigns#index {:subdomain=>”brands”} POST /campaigns(.:format) brands/campaigns#create {:subdomain=>”brands”} new_brands_campaign GET /campaigns/new(.:format) brands/campaigns#new {:subdomain=>”brands”} edit_brands_campaign GET /campaigns/:id/edit(.:format) brands/campaigns#edit {:subdomain=>”brands”} brands_campaign GET /campaigns/:id(.:format) brands/campaigns#show {:subdomain=>”brands”} PATCH /campaigns/:id(.:format) brands/campaigns#update {:subdomain=>”brands”} PUT /campaigns/:id(.:format) brands/campaigns#update {:subdomain=>”brands”} DELETE /campaigns/:id(.:format) brands/campaigns#destroy {:subdomain=>”brands”} brands_campaigns_posts GET /campaigns/:id
  • /posts(.:format) brands/campaigns#posts {:subdomain=>”brands”} brands_campaigns_details GET /campaigns/:id/details(.
  • :format) brands/campaigns#details {:subdomain=>”brands”} brands_campaigns_influencers GET /campaigns/:id/influencers(.
  • as shown in the snippet in your question simulates the patch method over post
  • The method to use when submitting the form, usually either “get” or “post”.

But on the server-side i am getting POST Request. I have checked that the jquery_ujs.js javascripts is loading into the browser as well.

@ng_real_ninja: Rails PATCH Method instead of POST #angularjs #reactjs

The method to use when submitting the form, usually either “get” or “post”. If “patch”, “put”, “delete”, or another verb is used, a hidden input with name _method is added to simulate the verb over post.

javascript

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.