27 Mar Export and Import database from local to heroku
Export and import from local to heroku From local run the following command replacing with your own values [shell] pg_dump --no-owner --no-acl -d db/padroncolima_development > yourdatabasedump [/shell] Upload this file "yourdatabasedump" into a public repository like S3( if that is the case dont forget to set public permissions to the...
If you want to retrieve all the orders that contain more than 2 shipments (Using Spree models)
[rails]
# this is using inner joins buy default from rails
Spree::Order.joins(:shipments).group("spree_shipments.order_id").having("count(spree_shipments.id) > 2")
[/rails]