Skip to content

Commit

Permalink
Use :ui attribute in human_attribute_name()
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Aug 10, 2018
1 parent 424a185 commit 524b9be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/mixins/ems_common_angular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def create_ems_button_add
else
@in_a_form = true
ems.errors.each do |field, msg|
add_flash("#{ems.class.human_attribute_name(field)} #{msg}", :error)
add_flash("#{ems.class.human_attribute_name(field, :ui => true)} #{msg}", :error)
end

drop_breadcrumb(:name => _("Add New %{tables}") % {:tables => ui_lookup(:tables => table_name)},
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/textual_summary_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def expand_textual_summary(summary, context)
result = send("textual_#{summary}")
return result if result.kind_of?(Hash) && result[:label]

automatic_label = context.class.human_attribute_name(summary, :default => summary.to_s.titleize)
automatic_label = context.class.human_attribute_name(summary, :default => summary.to_s.titleize, :ui => true)

case result
when Hash
Expand Down

0 comments on commit 524b9be

Please sign in to comment.