Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get '/account/plans', to: 'accounts#plans'
- post '/account/change_plan', to: 'accounts#change_plan'
- #accounts_controller.rb
- def change_plan
- @plan = Plan.find(params[:plan])
- current_user.plan = @plan
- current_user.save
- render 'payment_options'
- end
- <div class="plan-details">
- <header class= <%= plan.css %> >
- <h3><%= plan.name %></h3>
- <small><%= plan.visibility %></small>
- <p><%= plan.card_description.html_safe %></p>
- <span class="plan-price"><sup>$</sup><%= plan.amount.to_s %></span>
- </header>
- <article>
- <%= plan.features_description.html_safe %>
- <%= link_to button_text, account_change_plan_path, title: button_text, :class=>"btn btn-md btn-block btn-outline-green" %>
- </article>
- </div><!-- end plan details -->
- No route matches [GET] "/account/change_plan"
Add Comment
Please, Sign In to add comment