class Layout include MongoMapper::Document key :name, String, :required => true, :index => true key :description, String key_i18n :content, String validates_format_of :name, :with => /^[a-zA-Z-_]+$/ end