Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Employee < ActiveRecord::Base
validates_presence_of :first_name, :last_name, :number, :user_id
validates_numericality_of :number
belongs_to :user
has_many :employments
has_many :checkouts, :through => :employments
def full_name
"#{first_name.camelize} #{last_name.camelize}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment