D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
hirb-0.7.3
/
lib
/
hirb
/
views
/
Filename :
mongo_db.rb
back
Copy
module Hirb::Views::MongoDb #:nodoc: def mongoid__document_view(obj) fields = obj.class.fields.keys fields.delete('_id') fields.unshift('_id') {:fields=>fields} end def mongo_mapper__document_view(obj) fields = obj.class.column_names fields.delete('_id') && fields.unshift('_id') {:fields=>fields} end alias_method :mongo_mapper__embedded_document_view, :mongo_mapper__document_view end Hirb::DynamicView.add Hirb::Views::MongoDb, :helper=>:auto_table