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-5.1.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.1.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.1.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.1.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.1.0 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.5 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.4 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.3 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.2 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-4.6.1 app/datatables/admin/effective_customers_datatable.rb
effective_orders-5.0.0 app/datatables/admin/effective_customers_datatable.rb