[Rails-core] Named has_*

2014-05-01 Thread Łukasz Niemier
It will be nice, if has_* methods will have named option. Example: has_many :foos, named: :boos # equivalent of has_many :boos, class_name: 'Foo', foreign_key: 'foo_id' IMHO it is quite often used feature. Also it will be nice to have scoped option that will allow easy flow with scoped models

Re: [Rails-core] Named has_*

2014-05-01 Thread Денис Редозубов
I also think it is used pretty frequent and may be a good convention. +1 on this, i personally will be glad to see this on trunk. 2014-05-01 19:57 GMT+04:00 Łukasz Niemier luk...@niemier.pl: It will be nice, if has_* methods will have named option. Example: has_many :foos, named: :boos #

Re: [Rails-core] Named has_*

2014-05-01 Thread Matt Jones
On May 1, 2014, at 11:57 AM, Łukasz Niemier luk...@niemier.pl wrote: It will be nice, if has_* methods will have named option. Example: has_many :foos, named: :boos # equivalent of has_many :boos, class_name: 'Foo', foreign_key: 'foo_id' IMHO it is quite often used feature. Also it

Re: [Rails-core] Named has_*

2014-05-01 Thread Łukasz Niemier
Yes. I have given bad example. It should be only: has_may :boos, class_name: 'Foo' I was writing fast as I encounter the problem, so don't be mad. W dni czw 1 maj, 2014 o 23∶31 użytkownik Matt Jones al2o...@gmail.com napisał: On May 1, 2014, at 11:57 AM, Łukasz Niemier luk...@niemier.pl