class Wco::SubscriptionsController
def set_lists
def set_lists super @products_list = Wco::Product.list leadsets = Leadset.where( "customer_id IS NOT NULL" ).map { |i| [ "leadset // #{i.company_url} (#{i.email})", i.customer_id ] } profiles = ::Ish::UserProfile.where( :customer_id.ne => nil ).map { |i| [ "profile // #{i.email}", i.customer_id ] } @customer_ids_list = leadsets + profiles @price_ids_list = Wco::Product.all.includes( :prices ).map do |i| price = i.prices[0] if price&.price_id puts! price.interval, 'price.interval' [ "#{i.name} // $#{price.amount_cents.to_f/100}/#{price.interval||'onetime'}", price.price_id ] else [ "#{i.name} - no price!!!", nil ] end end end