是否可以添加在作用域结算时执行的代码块?例如:
@users = User.where(name: "...") #doesn't resolve yet
@users.resolved do
puts "loaded: #{@users.map(&:name)}"
end
@users = @users.limit(4) # doesn't resolve yet
@users.load # resolves - hence prints loaded: user #1, user #2, ...