-
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
Assorted tidying up #1238
Assorted tidying up #1238
Conversation
These should use `full_messages` to get the field names from i18n, rather than just humanizing the field name.
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.
I love a good tidy up! 🥇
@@ -6,7 +6,7 @@ def navigation_items | |||
{ | |||
text: "External links", | |||
href: recommended_links_path, | |||
active: is_current?(recommended_links_path), | |||
active: controller.controller_name == "recommended_links", |
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.
Nice!
@@ -2,15 +2,15 @@ module FormsHelper | |||
def error_items(record, field) | |||
return unless record.errors[field].any? | |||
|
|||
record.errors[field].map do |error| | |||
{ text: "#{field.to_s.humanize} #{error}" } | |||
record.errors.full_messages_for(field).map do |error| |
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.
🎉
Some more minuscule cleanup/removals that we missed during the great Search Admin tidy up.