Skip to content

Instantly share code, notes, and snippets.

View jorrizza's full-sized avatar
🏠
Working from home

Joris van Rooij jorrizza

🏠
Working from home
View GitHub Profile
anonymous
anonymous / gist:1136918
Created August 10, 2011 14:31
Epic oneliner
get '/6b/:product_id/*' do
Product.newest(params['product_id']).to_a.map { |p| [ p, Product.where(Hash[params[:splat].first.split('/').map { |f| [ f.to_sym, (p.send f.to_sym) ] } ] ) ] }.show
end