eBooru/app/helpers/pools_helper.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

13 lines
234 B
Ruby

# frozen_string_literal: true
module PoolsHelper
def recent_updated_pools
pool_ids = session[:recent_pool_ids].to_s.scan(/\d+/)
if pool_ids.any?
Pool.where(["id IN (?)", pool_ids])
else
[]
end
end
end