Let's say I have lots of attributes that can only have a specific set of string values.

Typically we'd see the following. 

```
class User < ApplicationRecord
   validates :foo, inclusion: { in: ['some', 'array'] }
   validates :bar, inclusion: { in: ['another', 'array'] }
   validates :moo, inclusion: { in: ['one_more', 'array'] }
end

```

I have lots of these types of validations in my model and I want to DRY them up. So I tried the below but I get a error `undefined method 'validates' for #User:0x00007fdc10370408`.

```
class User < ApplicationRecord
  VALIDATION_ENUMS = {
    foo: %w[foo1 foo2],
    bar: %w[bar1 bar2]
  }.freeze

  validate :validate_enums

  def validate_enums
    VALIDATION_ENUMS.each_key do |attribute|
      validates attribute, inclusion: { in: VALIDATION_ENUMS[attribute] }
    end
  end
end

```

How do I get access to the ActiveModel::Validations helper methods from within my function?

Or is there a better way to do this?