3 ms·
Oh, it could be made general, just add the name of the actual datetime field as a parameter of the hash. Then you could drop the method into ActiveRecord. Anyw
by mattmcknight 17y ago
Oh, it could be made general, just add the name of the actual datetime field as a parameter of the hash. Then you could drop the method into ActiveRecord. Anyway, the second solution is okay, because it is explicit enough. However it it still builds a dependency on define_attribute_methods.