[Rails] Re: Chaining two named_scope that have a block of code

2008-09-26 Thread Fernando Perez
Fernando Perez wrote: I solved it by appending the first method to the chain. I have another problem: I want to chain 2 named_scopes that both have a :joins in their definition. The problem is that the :joins of the second named_scope in the chain doesn't get added to the query. IS

[Rails] Re: Chaining two named_scope that have a block of code

2008-09-26 Thread Fernando Perez
Actually chaining 2 named_scopes that have :joins in them is not yet possible as of Rails 2.1.1, the issue is fixed and is available in Rails edge, or we'll have to wait until 2.2 is out. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: Chaining two named_scope that have a block of code

2008-09-25 Thread Fernando Perez
I solved it by appending the first method to the chain. I have another problem: I want to chain 2 named_scopes that both have a :joins in their definition. The problem is that the :joins of the second named_scope in the chain doesn't get added to the query. IS that normal behavior? --