Sha256: 4b3032dba00a4ba16d9d0228c7595d4aa4399379114c95d8b29c70ac9e223a67
Contents?: true
Size: 425 Bytes
Versions: 19
Compression:
Stored size: 425 Bytes
Contents
class User < ActiveRecord::Base default_scope :order => 'id' serialize :data has_many :phone_numbers, :dependent => :destroy has_and_belongs_to_many :clubs has_one :website, :dependent => :destroy validates_presence_of :first_name, :age validates_numericality_of :age def to_param "#{self.id}-#{self.first_name}-#{self.last_name}".downcase.gsub(/\W/, ' ').strip.gsub(' ', '-').squeeze('-') end end
Version data entries
19 entries across 19 versions & 1 rubygems