Hi rails devs,
I’ve put the following code in a model:
protected
def validate
self[:lastupdate] = DateTime::now()
end
I wonder how I could get “sysdate” instead of the result of
DateTime::now() in the generated SQL request. The goal is to get the
database server time and not the application server time. You’ve
already figure out that I’m using Oracle ;).
I have 2 solutions:
- hack quote() into OracleAdapter
- add a trigger directly on the oracle table
Is somebody would have a better solution?
Regards,
Florent,