Sha256: 9d57d550ee9849b0d5eb21733acf039dc85e671f167a68146519b2dcd1e88b1d
Contents?: true
Size: 350 Bytes
Versions: 19
Compression:
Stored size: 350 Bytes
Contents
module Rhoconnect class ApiToken < StoreOrm field :value,:string field :user_id,:string validates_presence_of :user_id def self.create(fields) fields[:value] = fields[:value] || get_random_identifier fields[:id] = fields[:value] super(fields) end def user User.load(self.user_id) end end end
Version data entries
19 entries across 19 versions & 1 rubygems