Skip to content

Rails5: fix slice in burndown fixture

What does this MR do?

Fix NoMethodError: undefined method 'slice' for #<ActiveRecord::AssociationRelation []> for rake db:seed_fu for Rails 5.

In Rails 5 blanket array delegation was removed, so open_issues.slice() fails because slice is not in the explicitly delegated methods of Rails. These slice can also be replaced by limit queries.

Can be reproduced locally by running BUNDLE_GEMFILE=Gemfile.rails5 rake db:seed_fu

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

rails5 upgrade

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Rémy Coutable

Merge request reports