2021-04-29 21:17:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ReloadHelpers
|
|
|
|
def reload_models(*models)
|
2021-06-08 01:23:25 +05:30
|
|
|
models.compact.map(&:reload)
|
2021-04-29 21:17:54 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def subject_and_reload(*models)
|
|
|
|
subject
|
|
|
|
reload_models(*models)
|
|
|
|
end
|
|
|
|
end
|