summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/_navigation.html.haml2
-rw-r--r--billing/app/controllers/credit_card_info_controller.rb9
2 files changed, 9 insertions, 2 deletions
diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml
index f29625c..5701d13 100644
--- a/app/views/layouts/_navigation.html.haml
+++ b/app/views/layouts/_navigation.html.haml
@@ -3,5 +3,5 @@
= link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users)
= link_to_navigation t(:email_settings), edit_user_email_settings_path(@user), :active => controller?(:email_settings)
= link_to_navigation t(:support_tickets), auto_tickets_path, :active => controller?(:tickets)
- = link_to_navigation t(:billing_settings), new_customer_path, :active => controller?(:customer, :payments, :subscription)
+ = link_to_navigation t(:billing_settings), new_customer_path, :active => controller?(:customer, :payments, :subscription, :credit_card_info)
= link_to_navigation t(:logout), logout_path, :method => :delete
diff --git a/billing/app/controllers/credit_card_info_controller.rb b/billing/app/controllers/credit_card_info_controller.rb
index 99bf5cf..75865fe 100644
--- a/billing/app/controllers/credit_card_info_controller.rb
+++ b/billing/app/controllers/credit_card_info_controller.rb
@@ -1,5 +1,5 @@
class CreditCardInfoController < ApplicationController
- before_filter :authorize
+ before_filter :authorize, :set_user
def edit
@credit_card = Braintree::CreditCard.find(params[:id])
@@ -24,4 +24,11 @@ class CreditCardInfoController < ApplicationController
end
end
+
+ private
+
+ def set_user
+ @user = current_user
+ end
+
end