私はこのモデルを持っています
class Noticia
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
belongs_to :user
field :titulo, :type => String
field :conteudo, :type => String
field :tags, :type => Array
index :tags
slug :titulo
end
この環境で
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'inscricao', 'inscricoes'
inflect.irregular 'noticia', 'noticias'
inflect.irregular 'central', 'centrais'
end
「noticia」をローカルに作成すると、コレクション「noticia」に作成されます。しかし、heroku で「noticia」を作成すると、「noticias」というコレクションに表示されます。さらに、notcias
コレクションには検索を実行するためのフィールドがありませんでしたtags
。これは私のアプリにとって非常に重要ですnoticia
何か案は?