Exporting and Import Heroku DB

Recently I was playing around with my local database in my rails project, eventually I screw up, I had to delete all the data. I use rake db:resetand rake db:create but how I was going to get all the data again, manually ? No way.

»

Rails Postgresql Error ORDER clause

Postgresql ORDER clause or be used in a aggregate function

While working in a rails project recently, I step on an error that say: PG::Error: ERROR: column "number" must appear in the GROUP BY clause or be used in an aggregate function, I didn’t have any idea how to solve it.

»

Integrate Disqus with Octopress

I’m new to Octopress platform for Blogging, but so far I think is great and simple.

Creating my first post I felt so excited, as when you discover a new treasure or a secret path in your favorite game. But everything at the beginning is not going to be smooth. My first problem was that my post weren’t displaying the Disqus comments, that are a very common system for comments in the blog community.

»

Rails and select

In a rails project I’m working on I was trying to select from the database some sales with some conditions.

To start the Sale model has multiples associations .

class Sale < ActiveRecord::Base
  belongs_to :voucher
  belongs_to :client
  has_many :line_items, dependent: :destroy
  has_many :bills
end

So the goal of this select was to obtain all the Sales where the LineItems has express_checkout set it to true.

»