Would it be acceptable to add options for doing eager loading when logging in a user?
E.g.
def find_by_credentials(*credentials)
# ...
arel = @klass.where(relation)
arel = arel.includes(@eager_loading_options) if @eager_loading_options.present?
arel.first
end
config.user_config do |user|
user.eager_loading = {things: {other_things: [:then, :that, :stuff]}}
end
Would it be acceptable to add options for doing eager loading when logging in a user?
E.g.