diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-22 08:00:50 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-22 08:00:50 -0700 |
| commit | 86036fa0e99d77b34edf16349b1e681db660558f (patch) | |
| tree | 107d8bb986c3ebfe90aa39f1a38cb89487369fa2 /app/models | |
| parent | b675903ccb615c1f1868cd46095fec140a4198ae (diff) | |
add applicant name to json response.
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 056039b..c298241 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,6 +1,10 @@ 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 |
