-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authors bugfixes #374
Authors bugfixes #374
Conversation
- modified create_toc, to_manual_toc and destroy actions in authors_controller to use Authority instead of Person
- updated authors browse filter to properly filter by person's traits (period, gender, birth and death years)
config/locales/he.yml
Outdated
@@ -1109,6 +1109,7 @@ he: | |||
no_such_item: אין פריט כזה. | |||
item: פריט | |||
created_toc: נוצר דף יוצר עם תבנית ריקה | |||
already_has_toc: Author already has TOC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I wrote spec for #to_manual_toc it turned out we miss this string
@@ -282,81 +282,63 @@ def by_tag | |||
end | |||
|
|||
def create_toc | |||
author = Person.find(params[:id]) | |||
unless author.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we have many places like this all over the code. They are useless, as ActiveRecord.find method raises an RecordNotFound exception if record with given id is not found. So we never get author.nil? condition satisfied, but code expects nil to be returned in such case.
Fixed several bugs introduced during Authorities refactoring:
P.S. also please see #373