Sha256: f7a147fa98a876d6a8b2c5d85239e29d0e643799ce40f1edaeed7e40ed3fdf85

Contents?: true

Size: 285 Bytes

Versions: 6

Compression:

Stored size: 285 Bytes

Contents

require_dependency "tang/application_controller"

module Tang
  class Admin::DashboardController < Admin::ApplicationController
    def index
      @total_customers = Tang.customer_class.where.not(stripe_id: nil).count
      @total_volume = Charge.sum(:amount) / 100
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.2 app/controllers/tang/admin/dashboard_controller.rb
tang-0.2.1 app/controllers/tang/admin/dashboard_controller.rb
tang-0.2.0 app/controllers/tang/admin/dashboard_controller.rb
tang-0.1.0 app/controllers/tang/admin/dashboard_controller.rb
tang-0.0.9 app/controllers/tang/admin/dashboard_controller.rb
tang-0.0.8 app/controllers/tang/admin/dashboard_controller.rb