Re: [Rails] Generated SQl-Query using joins and default_scope

2012-10-16 Thread Noxx
Hi Colin, Thank you for your reply. Sorry that I forgot to mention the versions I'm using: My Ruby version is "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]" (installed via rvm) and I'm using Rails v3.2.8. However, I found the problem. I tried to test out if something changes if I d

Re: [Rails] Generated SQl-Query using joins and default_scope

2012-10-16 Thread Colin Law
On 15 October 2012 21:08, Noxx wrote: > Hi there. > I hope someone can help me and give a tipp how to solve this issue. > > I have three models, which you can see below (I pasted only the necessary > parts): > > class User > has_many :attachments > end > > class Folder > has_many :attachments

[Rails] Generated SQl-Query using joins and default_scope

2012-10-16 Thread Noxx
Hi there. I hope someone can help me and give a tipp how to solve this issue. I have three models, which you can see below (I pasted only the necessary parts): *class User has_many :attachments end class Folder has_many :attachments end class Attachment belongs_to :folder belongs_to :u