Skip to content

Instantly share code, notes, and snippets.

@durran
Created July 11, 2013 15:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save durran/5976483 to your computer and use it in GitHub Desktop.
Save durran/5976483 to your computer and use it in GitHub Desktop.
iterate models and fields.
Mongoid.models.each do |model|
model.fields.each do |name, field|
# name is the string name of the field, field is the Field object.
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment