summaryrefslogtreecommitdiff
path: root/bin/sample.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 13:03:45 -0700
committermo khan <mo@mokhan.ca>2014-02-22 13:03:45 -0700
commitd363dc6298e8210fb3a5eddea8a6916a54005290 (patch)
treed722fbe64f53cfa4f05312e7444f007bb30c15f2 /bin/sample.rb
parentd62b19c584862b3c54559348475a93fffd985e7f (diff)
switch from has_one to belongs_to relationship.
Diffstat (limited to 'bin/sample.rb')
-rwxr-xr-xbin/sample.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sample.rb b/bin/sample.rb
index e1e92a3..97bfcf0 100755
--- a/bin/sample.rb
+++ b/bin/sample.rb
@@ -9,12 +9,13 @@ hal = User.create(first_name: 'hal', last_name: 'kvisle', company: xyz_resources
township_1 = Location.create(latitude: 51.06, longitude: -114.09, township: '1')
township_2 = Location.create(latitude: 40.06, longitude: -100.09, township: '2')
+township_3 = Location.create(latitude: 30.06, longitude: -90.01, township: '3')
public_license = jd.apply_for_license(WellType::NFW, township_1)
public_license.update_attribute(:issued_at, 1.day.ago)
public_license.update_attribute(:expired_at, 1.year.from_now)
-public_expired_license = jd.apply_for_license(WellType::DPT, township_1)
+public_expired_license = jd.apply_for_license(WellType::DPT, township_3)
public_expired_license.update_attribute(:issued_at, 1.year.ago)
public_expired_license.update_attribute(:expired_at, 1.day.ago)