mirror of
https://github.com/discourse/discourse.git
synced 2024-12-08 11:13:41 +08:00
f4e424d7d4
So we have to order by calling `find_each(order: :desc)`. Note that that will order rows by Id, not by `last_match_at` as we tried before (though that didn't work).
10 lines
376 B
Ruby
10 lines
376 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:screened_ip_address) do
|
|
action_type ScreenedIpAddress.actions[:block]
|
|
ip_address { sequence(:ip_address) { |i| "99.232.23.#{i % 254}" } }
|
|
match_count { sequence(:match_count) { |n| n } }
|
|
last_match_at { sequence(:last_match_at) { |n| Time.now + n.days } }
|
|
created_at { sequence(:created_at) { |n| Time.now + n.days } }
|
|
end
|