You need to perform a POST
request to change_subscription_path
, but you're requesting the page with a simple link_to so it's a GET
request.
Add :method => :post
in your link_to
options:
<%= link_to "Update", change_subscription_path, :confirm => "You sure?", :method => :post, :plan => @plan %>
Alternatively, you can:
use a form instead of a link and submit it with the
POST
methodchange the method for the
changeSubscription
action fromPOST
toGET
in routes.rb