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

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