Sha256: 51d46232d816bcacdbf4d1f207b0353d2ec91edcb6b58cb34282358bc51e55b5
Contents?: true
Size: 396 Bytes
Versions: 3
Compression:
Stored size: 396 Bytes
Contents
module Clipster class Clip < ActiveRecord::Base before_create :init_id self.primary_key = :url_hash attr_accessible :clip, :language, :title, :private validates :clip, :length => {:minimum => 3} validates :title, :length => {:minimum => 1} private def init_id self.url_hash = Time.now.to_f.to_s.gsub('.','').to_i.to_s(36) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
clipster-0.1.2 | app/models/clipster/clip.rb |
clipster-0.1.1 | app/models/clipster/clip.rb |
clipster-0.1.0 | app/models/clipster/clip.rb |