Project

General

Profile

Bug #7418

Capitals used for column-based activerecord errors

Added by Lukas Zapletal over 4 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

We should de-capitalize the following lines:

[lzap@lzapx foreman]$ ack errors.add | grep -v :base | grep -E '"[A-Z]'
app/services/tax_host.rb:134:        taxonomy.errors.add(taxable_type.tableize, _("You cannot remove %s that are used by hosts or inherited.") % taxable_type.tableize.humanize.downcase)
app/models/filter.rb:10:      record.errors.add(:search, _("Invalid search query: %s") % e)
app/models/nic/base.rb:56:            errors.add(attr, _("Can't use the same value as the primary interface"))
app/models/user.rb:469:      errors.add :role_ids, _("You can't assign some of roles you selected")
app/models/user.rb:476:      errors.add :admin, _("You can't change Administrator flag")
app/models/user.rb:489:      errors.add :default_location, _("Default locations need to be user locations first")
app/models/user.rb:495:      errors.add :default_organization, _("Default organizations need to be user organizations first")
app/models/concerns/orchestration/dhcp.rb:127:      errors.add(:ip, _("Does not match selected Subnet"))
app/models/external_usergroup.rb:37:    errors.add :auth_source_id, _("LDAP error - %{message}") % { :message => e.message }

Easy to fix.

Associated revisions

Revision fb69591a (diff)
Added by Lukas Zapletal over 4 years ago

Fixes #7418 - fixed capitalization for some AR errors

History

#1 Updated by Dominic Cleal over 4 years ago

  • Category set to Rails

#2 Updated by Lukas Zapletal over 4 years ago

  • Assignee set to Lukas Zapletal
  • Legacy Backlogs Release (now unused) set to 21

#3 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.3
  • Pull request https://github.com/theforeman/foreman/pull/1755 added
  • Pull request deleted ()

#4 Updated by Lukas Zapletal over 4 years ago

It's been a while when I filed a core PR...

https://github.com/theforeman/foreman/pull/1755

#5 Updated by Lukas Zapletal over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF