Does rails have converters

Hello, I have come from rich Java background and there we have Model attributes converter to accept the attribute data as text and persist to db as Integers using JPA entity converters. Do we have something sort of here in rails? Please suggest.

Are you talking about converting the character codes of the input text? Class: Encoding::Converter (Ruby 3.1.2)

Or is this more like a dictionary mapping unique strings to distinct integer values, like an enum? ActiveRecord::Enum

Another thought is the ActiveRecord Attributes API, where each column in the database has a strong type, and no matter how the attributes are sent to the controller (usually everything is a string) it will be converted to its correct type before saving. ActiveRecord::Attributes::ClassMethods

Walter