Sha256: 34616b7ab48fbe1e3982f41300c645da65e1e74dbe29a12a95670bec6c5a432d

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

module Hirb::Views::MongoDb #:nodoc:
  def mongoid__document_view(obj)
    {:fields=>['_id'] + obj.class.fields.keys}
  end

  def mongo_mapper__document_view(obj)
    {:fields=>obj.class.column_names}
  end

  def mongo_mapper__embedded_document_view(obj)
    {:fields=>obj.class.column_names}
  end
end

Hirb::DynamicView.add Hirb::Views::MongoDb, :helper=>:auto_table

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hirb-0.3.0 lib/hirb/views/mongo_db.rb