When I use <%= f.datetime_select :somedate %> in a form, it generates HTML like:
<%= f.datetime_select :somedate %>
The start of that code path, seems to be right about here:
https://github.com/rails/rails/blob/d90b4e2/activerecord/lib/active_record/base.rb#L1811
That was tricky to find! I hope this helps you find what you need