When I try to use the tod gem for my rails app I get a TypeError can't convert nil into Integer. It gets stuck on the first line in the create action in my controller.
def create
@event = current_user.hosted_events.build(event_params)
if @event.save
flash[:notice] = "Event Created"
redirect_to user_path(current_user)
end
This is my event.rb file
require 'tod/core_extensions'
class Event < ApplicationRecord
serialize :start_time, Tod::TimeOfDay
end
When I try to use the tod gem for my rails app I get a TypeError can't convert nil into Integer. It gets stuck on the first line in the create action in my controller.
This is my event.rb file