https://avo.cool logo
is it possible to have resource name in upperca...
# resources
h
is it possible to have resource name in uppercase? for example "NOC codes" instead of "Noc codes"
m
Thread automatically created by John Ngo in #1141725701549072486
f
you should be able to set in initializer file like
config/initializers/avo.rb
Copy code
ruby
resource :apps, label: 'APPS'
h
is it supposed to be like this?
Copy code
Avo.configure do |config|
  config.resources do
    resource :apps, label: 'APPS'
  end
end
f
yes, I am using it
but not sure about all caps, but it should work
l
also localization which will run throughout the app https://docs.avohq.io/3.0/i18n.html#localizing-resources
h
I tried both the config and localization
Copy code
resource_translations:
      occ_wil_type:
        zero: "WIL categories"
        one: "WIL category"
        other: "WIL categories"
but it does not seem to work for me
the renaming worked, not the uppercase though
l
It might be related to how the inflector treats it.
if your resource is
class OCCWilType
, then the translation key should be
o_c_c_will_type
h
the model name is OccWilType