summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f2197dd..446d3e2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,16 +1,12 @@
-class User
- attr_reader :company
-
- def initialize(company: nil)
- @company = company
- end
+class User < ActiveRecord::Base
+ belongs_to :company
def apply_for(well_type, location)
license = License.new
license.company = company
license.well_type = well_type
license.location = location
- #license.applicant = self
+ license.applicant = self
license.save!
license
end