Skip to content

Instantly share code, notes, and snippets.

@etozzato
Created December 23, 2009 00:41
Show Gist options
  • Select an option

  • Save etozzato/262217 to your computer and use it in GitHub Desktop.

Select an option

Save etozzato/262217 to your computer and use it in GitHub Desktop.
class Integration < Remote
has_many :queries
has_many :clicks, :finder_sql => 'SELECT DISTINCT clicks.* FROM clicks c, queries q WHERE c.query_id = q.id AND q.integration_id = #{id}'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment