From 0dbfe9883b35e4a3e47f5900a64986483300b7bc Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 22 Mar 2018 00:17:55 -0400 Subject: [PATCH] attr_readers --- app/models/company.rb | 1 + app/models/person.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/company.rb b/app/models/company.rb index 1ce02c6..76f5ea2 100644 --- a/app/models/company.rb +++ b/app/models/company.rb @@ -1,4 +1,5 @@ class Company + attr_reader :id, :name, :industry # connect to postgres DB = PG.connect(host: "localhost", port: 5432, dbname: 'contacts') diff --git a/app/models/person.rb b/app/models/person.rb index c230003..0947403 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -1,4 +1,5 @@ class Person + attr_reader :id, :name, :age, :home_id # connect to postgres DB = PG.connect(host: "localhost", port: 5432, dbname: 'contacts')