daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Sep 25th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. get '/account/plans', to: 'accounts#plans'
  2.   post '/account/change_plan', to: 'accounts#change_plan'
  3.    
  4. #accounts_controller.rb
  5.   def change_plan
  6.     @plan = Plan.find(params[:plan])
  7.     current_user.plan = @plan
  8.     current_user.save
  9.     render 'payment_options'
  10.   end
  11.    
  12. <div class="plan-details">
  13.     <header class= <%= plan.css %> >
  14.       <h3><%= plan.name %></h3>
  15.       <small><%= plan.visibility %></small>      
  16.       <p><%= plan.card_description.html_safe %></p>
  17.       <span class="plan-price"><sup>$</sup><%= plan.amount.to_s %></span>
  18.     </header>
  19.     <article>
  20.      <%= plan.features_description.html_safe %>
  21.       <%= link_to button_text,  account_change_plan_path, title: button_text, :class=>"btn btn-md btn-block btn-outline-green" %>
  22.     </article>
  23.  </div><!-- end plan details -->
  24.    
  25. No route matches [GET] "/account/change_plan"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top