Oksana Oksana - 1 year ago 84
Ruby Question

How get all column names of model in Mongoid

How can I get all column names from a

Mongoid
model in Rails?

Answer Source

Use

Model.fields.keys

Replace Model with your model name

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download