Class: Rack::WebProfiler::Model::CollectionRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/web_profiler/model.rb

Instance Method Summary collapse

Instance Method Details

#before_createObject

Generate a token to the record before create it.



79
80
81
82
# File 'lib/rack/web_profiler/model.rb', line 79

def before_create
  token      = Time.now.to_f.to_s.delete(".").to_i
  self.token = token.to_s(36)
end