Skip to content

Commit

Permalink
Merge pull request #4449 from mzazrivec/use_ui_attribute_in_human_att…
Browse files Browse the repository at this point in the history
…ribute_name

Use :ui attribute in human_attribute_name()
  • Loading branch information
martinpovolny authored Aug 10, 2018
2 parents 6d798bb + 524b9be commit 59dc7ac
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 59dc7ac

Please sign in to comment.