Re: [Rails-core] Merge scopes with OR

2012-08-11 Thread Jonathan Lozinski
Hi folks. I wrote the pull request that's in for this. I'm still looking for some feedback. In particular the main issue with it is in replacing the where clauses without hosing other aspects of the scopes. Perhaps Aaron would like to take a look at it, as I know he has done a fair bit of

[Rails-core] Please update Rails guides to reflect 3.2.8

2012-08-11 Thread Rodrigo Rosenfeld Rosas
I was showing the Rails Guides to a friend and just noticed it is still pointing to 3.2.7. Would you mind in updating it to 3.2.8, please? Thanks in advance, Rodrigo. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To post to this

Re: [Rails-core] Please update Rails guides to reflect 3.2.8

2012-08-11 Thread Xavier Noria
On Sat, Aug 11, 2012 at 5:54 PM, Rodrigo Rosenfeld Rosas rr.ro...@gmail.com wrote: I was showing the Rails Guides to a friend and just noticed it is still pointing to 3.2.7. Would you mind in updating it to 3.2.8, please? The INFALLIBLE script that automatically publishes the stable docs

Re: [Rails-core] Activerecord: how to write a new feature?

2012-08-11 Thread Rafael Almeida
On Friday, August 10, 2012 5:50:58 PM UTC-3, EMoreth wrote: Try this: Project.joins(:services).where(:services = { :id = [1,2] }).group(:id).having(count(*) = 2).all This produces to me: SELECT `projects`.* FROM `projects` INNER JOIN `services` ON `services`.`project_id` =

Re: [Rails-core] Activerecord: how to write a new feature?

2012-08-11 Thread Matt Jones
On Aug 11, 2012, at 6:23 PM, Rafael Almeida wrote: On Friday, August 10, 2012 5:50:58 PM UTC-3, EMoreth wrote: Try this: Project.joins(:services).where(:services = { :id = [1,2] }).group(:id).having(count(*) = 2).all This produces to me: SELECT `projects`.* FROM `projects` INNER