Sha256: a61949bc7a060a5b4d08b18987327773525b5c17caf947fd11772a241d134d47

Contents?: true

Size: 595 Bytes

Versions: 79

Compression:

Stored size: 595 Bytes

Contents

module Admin
  class EffectiveCustomersDatatable < Effective::Datatable
    datatable do

      col :id, visible: false

      col :user, search: :string

      col :email do |customer|
        customer.user.email
      end

      if EffectiveOrders.stripe?
        col :stripe_customer_id
        col :active_card
      end

      actions_col do |customer|
        link_to('Manage', "https://dashboard.stripe.com/#{'test/' if Rails.env.development?}customers/#{customer.stripe_customer_id}")
      end

    end

    collection do
      Effective::Customer.includes(:user).all
    end
  end
end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
effective_orders-6.14.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.14.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.14.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.13.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.13.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.13.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.13.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.12.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.12.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.12.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.12.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.12.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.10 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.9 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.8 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.7 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.6 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.5 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.9.2 app/datatables/admin/effective_customers_datatable.rb