Change to use array.first(5) instead of array[0..4]

This commit is contained in:
鳥井 雪 2014-12-17 17:08:30 +09:00
parent 560035b185
commit a61ba6f506

View File

@ -6,7 +6,7 @@ class Fluentd::SettingsController < ApplicationController
before_action :set_config, only: [:show, :edit, :update]
def show
@backup_files = @fluentd.agent.backup_files_in_new_order[0..4].map do |file_path|
@backup_files = @fluentd.agent.backup_files_in_new_order.first(5).map do |file_path|
Fluentd::Setting::BackupFile.new(file_path)
end