diff --git a/app/models/user.rb b/app/models/user.rb index d2d7344..6459040 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -44,7 +44,7 @@ class User < ActiveRecord::Base end end - def debt + def balance @balance || begin headers = { "Authorization" => "Token token=#{Rails.application.secrets.tab_api_key}", diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 04abf65..2391e6d 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -42,7 +42,7 @@ %li= link_to "Edit avatar", edit_user_path(current_user) %li %p.navbar-text - Debt: #{euro(current_user.debt)} + Balance: #{euro_from_cents(current_user.balance)} .visible-xs.navbar-form .form-group - if user_signed_in?