Sha256: 014dfcd8737f2c494d55e7ed94b3796508bb3aa4e27be5d76bb2eccd90fd3738
Contents?: true
Size: 784 Bytes
Versions: 14
Compression:
Stored size: 784 Bytes
Contents
class EffectiveCustomersDatatable < Effective::Datatable datatable do col :id, visible: false #col 'user.email' if EffectiveOrders.stripe_enabled col :stripe_customer_id col :active_card end if EffectiveOrders.stripe_connect_enabled col :stripe_connect_access_token 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.joins(:user).all end # def search_column(collection, table_column, search_term) # return collection.where('subscriptions.stripe_plan_id ILIKE ?', "%#{search_term}%") if table_column[:name] == 'subscription_types' # super # end end
Version data entries
14 entries across 14 versions & 1 rubygems