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 : > It will be nice, if has_* methods will have named option. Example: > > has_many :foos, named: :boos > > # equivalent of

Re: [Rails-core] Objects are compared by id, may be comparing by primary_key is more general

2014-01-28 Thread Денис Редозубов
You can't compare two non-persisted objects with primary key, it will break compatibility. You can always implement new custom logic in your application or even a gem, but i can see no point in messing with == in AR. 2014/1/28 Alex Teut > As described in > http://apidock.com/rails/v3.2.13/Activ