This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you'd obviously have more settings somewhere | |
set :scm, :git | |
set :repository, "[email protected]:defunkt/github.git" | |
set :branch, "origin/master" | |
set :migrate_target, :current # this tells capistrano where to run the migration. otherwise it would try to use the latest release directory (/path/to/app/releases/2012XXXXXXXXX) | |
set :use_sudo, false | |
set :ssh_options, {:forward_agent => true} # so you can checkout the git repo without giving the server access to the repo | |
set :rails_env, 'production' | |
# These are here to override the defaults by cap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schema "comments" do | |
field :text, :string | |
# ... more schema ... | |
field :ancestor_id, :integer, virtual: true | |
end | |
def thread(comment) do | |
from c in Comment, | |
join: cp in CommentPath, on: c.id == cp.descendant_id, | |
where: cp.ancestor_id == ^comment.id, |