ActionView::PartialIteration Ruby on Rails 5.1.2 Class ActionView::PartialIteration < Object actionview/lib/action_view/renderer/partial_renderer.rb Methods F first? L last? N new Attributes [R] index The current iteration of the partial. [R] size The number of iterations that will be done by the partial. Class Public methods new(size) Link Source: show | on GitHub # File actionview/lib/action_view/renderer/partial_renderer.rb, line 12 def initialize(size) @size = size @index = 0 end Instance Public methods first?() Link Check if this is the first iteration of the partial. Source: show | on GitHub # File actionview/lib/action_view/renderer/partial_renderer.rb, line 18 def first? index == 0 end last?() Link Check if this is the last iteration of the partial. Source: show | on GitHub # File actionview/lib/action_view/renderer/partial_renderer.rb, line 23 def last? index == size - 1 end