refactor: simplify localized_name method
- Remove I18n translation from localized_name - Return city name directly instead This change simplifies the method's implementation by returning the city name directly, avoiding the overhead of translation. Additionally, it improves code clarity by reducing complexity.
This commit is contained in:
parent
6dce657126
commit
cb8e5dd57d
@ -152,7 +152,8 @@ class City < ApplicationRecord
|
||||
end
|
||||
|
||||
def localized_name
|
||||
I18n.t("cities.#{name.parameterize.underscore}", default: name)
|
||||
# I18n.t("cities.#{name.parameterize.underscore}", default: name)
|
||||
name
|
||||
end
|
||||
|
||||
def full_name
|
||||
|
Loading…
Reference in New Issue
Block a user