mongoid-friendly-timestamps (0.0.1)

Lee Henson
2011-02-09T17:51:42Z

Adds a 'friendly_timestamp' method with which you can define a pair of linked timestamp fields (one a raw float for precision, the other a human-readable string). For example: class MyDocument include Mongoid::Document include Mongoid::Friendly::Timestamps friendly_timestamp :timestamp, :friendly_timestamp end doc = MyDocument.new doc.timestamp = Time.now # doc.friendly_timestamp == Time.now in 'dd-mmm-yyyy hh:mm:ss.nnnnnnnnn' format