search for: timestamp_create

Displaying 2 results from an estimated 2 matches for "timestamp_create".

2006 Feb 22
4
UUIDTool and weird timestamp split error
Hi, I am using UUIDTools to generate my Guids. It works fine on my computer (Windows Xp), but doesn''t work on my host (TextDrive) The error is: Loading production environment. >> UUID.timestamp_create.to_s /sbin/ifconfig: Permission denied NoMethodError: private method `split'' called for nil:NilClass from ./script/../config/../config/../lib/uuidtools.rb:236:in `timestamp_create'' from ./script/../config/../config/../lib/uuidtools.rb:226:in `synchronize''...
2007 Jun 16
1
extending activerecord base with after_initialize
...is greatly appreciated. cheers. === usesguid.rb === require ''uuidtools'' module ActiveRecord module Usesguid def self.included(base) # :nodoc: super base.extend ClassMethods end module ClassMethods def after_initialize self.id ||= UUID.timestamp_create().to_s.gsub(''-'','''') end end end end ActiveRecord::Base.class_eval do include ActiveRecord::Usesguid end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on...