I have a model called Product. The Product has date_modified and date_created fields. I'd like to set the value to now() (mysql). I thought it'd be as simple as setting the value in the controller.create method:
@product = Product.new(params[:product])
@product.date_created = 'now()'
The 'now()' value needs to be un-escaped: values(now(), 'string', etc..)
But that doesn't do it. What gives? Also, is there a way to do this in the model?