Title / Description
Code named_scope :linked_to, lambda { |ovs| { :select => "domain_objects.*, count(links.from_id) AS object_count", :conditions => [ "links.object_value_id IN (?)", ovs ], :joins => "INNER JOIN links ON links.from_id = domain_objects.id", :group => "links.from_id HAVING object_count >= #{ovs.size}" } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code