From d363dc6298e8210fb3a5eddea8a6916a54005290 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 22 Feb 2014 13:03:45 -0700 Subject: switch from has_one to belongs_to relationship. --- bin/sample.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/sample.rb') 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) -- cgit v1.2.3