summaryrefslogtreecommitdiff
path: root/app/models/user.rb
blob: c2982411d5c6f270aba9ff08a8d4b174c228cd62 (plain)
1
2
3
4
5
6
7
8
9
10
11
class User < ActiveRecord::Base
  belongs_to :company

  def full_name
    "#{first_name} #{last_name}"
  end

  def apply_for_license(well_type, location)
    company.licenses.create(well_type: well_type, location: location, applicant: self)
  end
end