Skip to content

Commit eb89cc8

Browse files
committed
Updates README wrong example on law of demeter
1 parent 56cd70e commit eb89cc8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,23 @@ class Article < ActiveRecord::Base
8383
belongs_to :author
8484

8585
def author_name
86-
personal_information.name
86+
author.name
8787
end
8888

8989
def author_birthdate
90-
personal_information.birthdate
90+
author.birthdate
9191
end
9292

9393
def author_gender
94-
personal_information.gender
94+
author.gender
9595
end
9696

9797
def author_city
98-
personal_information.city
98+
author.city
9999
end
100100

101101
def author_last_name
102-
personal_information.last_name
102+
author.last_name
103103
end
104104
end
105105
```

0 commit comments

Comments
 (0)