From 577c1f3e92040ab79fcd67b818c7dc8531aaa211 Mon Sep 17 00:00:00 2001 From: claucece Date: Wed, 23 Sep 2015 23:57:44 -0500 Subject: add subs_index and start show --- .../app/controllers/subscriptions_controller.rb | 9 ++++-- .../billing/app/views/subscriptions/index.html.erb | 36 ++++++++++++++-------- .../billing/app/views/subscriptions/show.html.erb | 26 ++++++++++++++++ 3 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 engines/billing/app/views/subscriptions/show.html.erb (limited to 'engines/billing') diff --git a/engines/billing/app/controllers/subscriptions_controller.rb b/engines/billing/app/controllers/subscriptions_controller.rb index dda328a..65db21b 100644 --- a/engines/billing/app/controllers/subscriptions_controller.rb +++ b/engines/billing/app/controllers/subscriptions_controller.rb @@ -7,7 +7,12 @@ class SubscriptionsController < BillingBaseController end def show - @subscription = Braintree::Plan.all.find params[:subscription_id] + @subscriptions = Braintree::Plan.all + @subscriptions = Braintree::Plan.all.find params[:subscription_id] + end + + def search + @subscription = Braintree::Subscription.search params[:status] end def new @@ -95,7 +100,7 @@ private end def destroy - @result = Braintree::Subscription.cancel params[:id] + @subscriptions = Braintree::Subscription.cancel params[:id] end diff --git a/engines/billing/app/views/subscriptions/index.html.erb b/engines/billing/app/views/subscriptions/index.html.erb index b47fae6..2037de3 100644 --- a/engines/billing/app/views/subscriptions/index.html.erb +++ b/engines/billing/app/views/subscriptions/index.html.erb @@ -1,19 +1,29 @@

Subscriptions



-

Choose subcription:

-
-