diff --git a/app/controllers/admin/expenses_controller.rb b/app/controllers/admin/expenses_controller.rb index bbe1b33b..5be43ed4 100644 --- a/app/controllers/admin/expenses_controller.rb +++ b/app/controllers/admin/expenses_controller.rb @@ -1,10 +1,14 @@ class Admin::ExpensesController < Admin::BaseController def index - @amount = Redis.current.get("monthly_funding_amount") || 0 + Redis.current.with do |conn| + @amount = conn.get("monthly_funding_amount") || 0 + end end def create - Redis.current.set("monthly_funding_amount", params[:amount]) + Redis.current.with do |conn| + conn.set("monthly_funding_amount", params[:amount]) + end redirect_to admin_expenses_path end