Why don't form helpers read custom model attributes ?

It always seems to go right to the backend, skipping your code. I run into this often.

My solution is this:

attr_writer :date_for_form

def date_for_form


before_validate :copy_form_fields

def copy_form_fields
self.attributes(:date) = self.date_for_form

Warning: untested. Write a unit test for this before you implement it :slight_smile:

This should allow you to use the form helpers on your new fields (date_for_form) Kinda kludgy but it will get you going.