padrino / padrino-framework

Padrino is a full-stack ruby framework built upon Sinatra.

Home Page:http://www.padrinorb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

padrino rake mi:create_indexes doesn't handle all mongoid models

sriedel opened this issue · comments

Do you want to request a feature or report a bug?

A Bug.

What is the current behavior?

If you have mongoid models residing in a directory other than /models or /app/models, invoking padrino rake mi:create_indexes will be a silent no-op.

Invoking ::Mongoid::Tasks::Database.create_indexes (as seen in $MONGOID_GEM_ROOT/lib/mongoid/tasks/database.rake) in a padrino console however does find and deal with all models.

What is the expected behavior?

Invoking 'padrino rake mi:create_indexes` will create any missing indexes of any mongoid model in memory, regardless of where the model resides in the directory tree.

Which versions of Ruby, Padrino, Sinatra, Rack, OS are you using? Did this work in previous versions?

MRI 2.6.1, Padrino 0.14.4, Sinatra 2.0.5, Rack 2.0.6, Linux 5.0.0