0
irb(main):019:0> a = Admin.first
=> #<Admin _id: 514b318da61654dd05000002, email: "[email protected]", encrypted_password: "$2a$10$b.cWtfPNgUcCubJRX2vjAO6vEsds9OTGO2tn6Lfz2cBU.mwTYsHw.">
irb(main):020:0> a.class.name
=> "Admin"
irb(main):021:0> a = Admin.all
=> #<Mongoid::Criteria
selector: {}
options: {}
class: Admin
embedded: false>
irb(main):022:0> a.class.name
=> "Mongoid::Criteria"
我如何得到型號名稱內「Mongoid ::標準」類得到的類名?從mongoid標準
謝謝!
非常感謝您! – hyperrjas 2013-03-22 11:50:41