diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index 428c1ef37..0da87512e 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -32,9 +32,10 @@ class OrdersController < ApplicationController @order = Order.find(params[:id]) @order.completed_at = Time.zone.now - # current_member.paid = true # or whatever @order.save + @order.update_account # apply paid account benefits, etc. + respond_to do |format| format.html # new.html.erb end diff --git a/app/models/product.rb b/app/models/product.rb index 830880478..dad488d59 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -23,6 +23,7 @@ class Product < ActiveRecord::Base start_date = member.account.paid_until || Time.zone.now member.account.paid_until = start_date + paid_months.months end + member.account.save end end