public
Created

  • Download Gist
effect.rb
Ruby
1 2 3 4 5
class Effect < AR::Base
 
scope :my_scope, select('project_id, taskType, user_id, SUM(hours)').joins(:project_task).where(:project_tasks => {:project_id => 2, :taskType => 'Pre-Sales'}).group('user_id')
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.