2021-03-19 17:08:58 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ReloadHelpers
|
|
|
|
def reload_models(*models)
|
2021-05-07 08:10:27 -04:00
|
|
|
models.compact.map(&:reload)
|
2021-03-19 17:08:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def subject_and_reload(*models)
|
|
|
|
subject
|
|
|
|
reload_models(*models)
|
|
|
|
end
|
|
|
|
end
|