Sha256: 7fe7d8992c3871e7c388252d1790bf5adfbca70a04cb90f57670eb367c7471b7

Contents?: true

Size: 549 Bytes

Versions: 9

Compression:

Stored size: 549 Bytes

Contents

class PlansController < ApplicationController
  layout Saucy::Layouts.to_proc

  def index
    @plans = Plan.ordered
  end

  def edit
    @plans = Plan.ordered
    @account = current_account
  end

  def update
    @plans = Plan.ordered
    @account = current_account
    if @account.save_customer_and_subscription!(params[:account])
      flash[:upgrade_plan_id] = @account.plan_id
      redirect_to edit_account_path(@account), :notice => t('.update.notice', :default => "Plan changed successfully")
    else
      render :edit
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
saucy-0.3.4.1 app/controllers/plans_controller.rb
saucy-0.3.4 app/controllers/plans_controller.rb
saucy-0.3.3 app/controllers/plans_controller.rb
saucy-0.3.2 app/controllers/plans_controller.rb
saucy-0.3.1 app/controllers/plans_controller.rb
saucy-0.3.0 app/controllers/plans_controller.rb
saucy-0.2.45 app/controllers/plans_controller.rb
saucy-0.2.44 app/controllers/plans_controller.rb
saucy-0.2.43 app/controllers/plans_controller.rb