首页 > 解决方案 > Rails .first(n),但在取 n 之前跳过“m”

问题描述

<% current_user.education_experiences.first(4).each_with_index do |exp, i| %>

我希望 .first(n) 可以变成 .first(8)、.drop_first(4) 或类似的东西

标签: ruby-on-rails-5

解决方案


推荐阅读