Overriding to_json using Padrino
===

I can't seem to figure out how to override my to_json function. The reason I am trying to override it is because I want to add an extra field into the json output thats not part of my model.

Here is what I have:

    def to_json
    {
      :message       => message,
      :account_id    => account_id,
      :course_id     => course_id,
      :answers_count => Post.answers_for(self).count,
      :created_at    => created_at,      
    }.to_json
    end

And it just doesn't seem to override it, please help me!!!