DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

Rails I18n model name with namespace

config/locales/models.en.yml

en:
  activerecord:
    models:
      user: User
      properties/building: Building
      properties/unit: Unit
      properties/room: Room

if you have following models

class Properties::Building < ApplicationRecord end
class Properties::Unit < ApplicationRecord end
class Properties::Room < ApplicationRecord end

Top comments (0)