Permalink
Browse files

Merge pull request #10 from Simon143/master

Fix for Postgres GROUP BY compatibility
  • Loading branch information...
2 parents 04b4eb9 + d768bae commit c6c090f5af1f9aa5d5f85f4490f9c357824a2b31 @bshaffer committed Nov 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/assets_controller.rb
@@ -64,7 +64,7 @@ def types_for_project
wheres << "(#{mapping['project_id']} = #{@project.id})"
end
- return Attachment.find(:all, {:group => "container_type", :conditions => wheres.join(' OR '), :joins => joins.join(' ')}).collect(&:container_type).compact
+ return Attachment.find(:all, {:select => "container_type", :group => "container_type", :conditions => wheres.join(' OR '), :joins => joins.join(' ')}).collect(&:container_type).compact
end
def find_project

0 comments on commit c6c090f

Please sign in to comment.