Re: [Rails-core] [Change Request - warning, controversial] Rename "belongs_to" to what it actually is

2016-09-24 Thread Xavier Noria
On Sat, Sep 24, 2016 at 12:01 PM, Richard McSharry wrote: **Example 1 - one-to-one** > ```ruby > class Employee > has_one :salary > end > class Salary > has_key_for :employee > end > ``` > Generally speaking, the Active Record API expresses stuff at the entity level, at

Re: [Rails-core] [Change Request - warning, controversial] Rename "belongs_to" to what it actually is

2016-09-24 Thread Muhammad Nuzaihan Bin Kamal Luddin
Sequel gem (which i had used for supporting legacy databases) is clearer to me. But i still can work on both ActiveRecord and Sequel-type associations. https://github.com/jeremyevans/sequel#associations On Sat, Sep 24, 2016 at 10:42 PM, Chad Woolley wrote: > I agree.

Re: [Rails-core] [Change Request - warning, controversial] Rename "belongs_to" to what it actually is

2016-09-24 Thread Chad Woolley
I agree. I've been doing Rails for 10 years (and databases for going on 25)), and "belongs_to" has always been a cognitive blocker for me. I wouldn't do away with "belongs_to", but making "has_key_for" aliases sounds like a great idea, for people who want to write their code that way. But, most

[Rails-core] [Change Request - warning, controversial] Rename "belongs_to" to what it actually is

2016-09-24 Thread Richard McSharry
Any framework that has convention over configuration has the the problem that newcomers have to learn the conventions. I think that one of the biggest stumbling blocks to new users of Rails is the way associations are described. Just look at the number of questions on this on SO. M-1 and 1-M