rails lloop

rails loop

1
2
3
@posts.each_with_index do |post, index|
  render :partial => "post", :object => post, :locals => {:index => index}
end

你可能感兴趣的:(Rails)