cast(value)
public

No documentation available.

# File activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb, line 17
        def cast(value)
          return if value.nil?

          if value.is_a?(Hash)
            set_time_zone_without_conversion(super)
          elsif value.respond_to?(:in_time_zone)
            begin
              result = super(user_input_in_time_zone(value)) || super
              if result && type == :time
                result = result.change(year: 2000, month: 1, day: 1)
              end
              result
            rescue ArgumentError
              nil
            end
          elsif value.respond_to?(:infinite?) && value.infinite?
            value
          else
            map(super) { |v| cast(v) }
          end
        end