ruby - link_to works, but not button_to with parameter to pass -


i have link_to trying convert button. not sure how pass parameter plan_id in button_to call. per other threads on this, have used :get method inside button_to call.

works:

<%= link_to "sign up", new_subscription_path(:plan_id => plan.id) %> 

does not plan_id passed :

<%= button_to "sign up", new_subscription_path(:plan_id => plan.id) , :class => "btn btn-primary  btn-large", :method => :get %>  

please can tell me wrong?

<%= link_to "sign up",new_subscription_path(:plan_id => plan.id),{ class:"btn btn-primary btn-large"} %> 

it make link button.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -