Re: [Rails] real array via has_many

2016-05-27 Thread Norbert Melzer
Has many does not resemble an array but a set. Zdravko Balorda schrieb am Fr., 27. Mai 2016 15:20: > The way to implement arrays in ActiveRecord is via has_many. > But, normally Ruby arrays keep the order of elements, while has_many do > not. > This is not just a matter of "order by" clause. > A

[Rails] real array via has_many

2016-05-27 Thread Zdravko Balorda
The way to implement arrays in ActiveRecord is via has_many. But, normally Ruby arrays keep the order of elements, while has_many do not. This is not just a matter of "order by" clause. At every update one needs to index database table rows properly, so that "order by" would work. Thanks in advanc