Sha256: b192d8a18148857b81cd3e0da4014ff7123bffab294c8ee2f9b517d103bc04a9
Contents?: true
Size: 287 Bytes
Versions: 1
Compression:
Stored size: 287 Bytes
Contents
require 'devise' class Token < ActiveRecord::Base belongs_to :user validate :token, :presence => true before_validation :generate_token attr_accessible # nothing is changable protected def generate_token self.token = Devise.friendly_token.first(20) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
travis-core-0.0.1 | lib/travis/model/token.rb |