aa
Ruby
code posted
created at 23 Jan 20:16
Edit
|
Back
1 |
Site.find(52).versions.flat_map(&:child_site_lists).flatten.map{|a| a.site_list_brands.select{|a| a.brand_id == 886 }.map(&:latest_brand_link).compact.map{|blink| [blink.affiliate_link_url.canonical_url.original_string_url, blink.released_at.to_s]}.map{|b| b << a.name}}.flatten(1).uniq.sort_by{|a| [a[2].downcase, a[1]]}.map{|b| puts "#{b[2].ljust(21)} : #{b[1].blank? ? "Draft".ljust(23) : b[1]}: #{b[0]}"} |
408 Bytes in 2 ms with coderay