Sha256: 45369af112dc2ec2ca03bb6944bff178dff28f107bca7d385f250fd6deeb07a7

Contents?: true

Size: 548 Bytes

Versions: 72

Compression:

Stored size: 548 Bytes

Contents

class Admin::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

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
effective_orders-6.0.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-6.0.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.9.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.9.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.9.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.9.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.9.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.8.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.8.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.8.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.7.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.7.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.7.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.7.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.7.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.6.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.6.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.6.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.5.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.5.1 app/datatables/admin/effective_customers_datatable.rb