Skip to content

Instantly share code, notes, and snippets.

@rthbound
Created December 2, 2011 23:14
Show Gist options
  • Save rthbound/1425289 to your computer and use it in GitHub Desktop.
Save rthbound/1425289 to your computer and use it in GitHub Desktop.
Glitch
Customer.find(:all, :include => :posts).each do |customer|
if !customer.posts.blank?
add customer_posts_path(customer.id)
customer.posts.each do |post|
x = post.id
#add customer_posts_path(:customer_id => customer.id, :id => post.id)
add customer_posts_path(customer.id, x)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment