def _transform_options_for_attribute(attr, options={})
      return options unless self.class.respond_to?(:attribute_types)
      options.transform_values {|value|
        self.class.attribute_types.with_indifferent_access[attr].cast(value)
      }
    end
def _transform_options_for_attribute(attr, options={})
      return options unless self.class.respond_to?(:attribute_types)
      options.transform_values {|value|
        self.class.attribute_types.with_indifferent_access[attr].cast(value)
      }
    end
Facilitates easier change checking for ActiveRecord::Enum attributes
 by casting any symbolized :to and :from values into their native strings.