I am trying to use a model function within a scope and was wondering if something like this is possible?

```
class WeighIn < ApplicationRecord
    belongs_to :client

    scope :overweight, -> { where("current_weight >= ?", target_weight) }

    def target_weight
        client.target_weight
    end
end

```

When I call `WeighIn.overweight` I see the error:

```
undefined local variable or method `target_weight' for #<WeighIn::ActiveRecord_Relation:0x007fb31baa1fb0>

```

... which makes sense since the `client_id` is changing depending on the `weigh_in`. Is there a different way to ask this question?