Skip to content

Commit

Permalink
Use map to create the array
Browse files Browse the repository at this point in the history
  • Loading branch information
yoldas committed Nov 21, 2024
1 parent 0e6d06c commit ceaca44
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ def date_format
private

def create_rows
[].tap do |rows|
assets_data.each do |data|
rows << Row.new(data)
end
end
assets_data.map { |data| Row.new(data) }
end

def assets_data
Expand Down

0 comments on commit ceaca44

Please sign in to comment.