Skip to content

tod support #162

@realprabs

Description

@realprabs

When I serialize the time field using https://github.com/jackc/tod, I get "not a valid time" error from validates_timeliness.

# my_model.rb
class MyModel  < ApplicationRecord
  validates_time :closes_at, after: :opens_at
  serialize :opens_at, Tod::TimeOfDay
  serialize :closes_at, Tod::TimeOfDay
end
MyModel.where(opens_at: "10:30", closes_at: "14:30").first_or_create
# Closes at is not a valid time

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions