In my controller i fetch 9 row's for object organizations.
@organizations = Organization.where(parent_id: 1).order(city_id: :asc, is_vip: :desc, title: :asc).limit(25).sample(9)
and then in view i must separate this 9 value's to 3 view loops, like first .each do if for row's 1-3, second for 4-6, third 6-9
and i try so:
- @organizations[0..2].each do |org|
...
- @organizations[3..5].each do |org|
...
- @organizations[6..8].each do |org|
...
but it seems that i do something wrong, but what exactly? and how to do it right?