-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
this commit introduced the bug : 1b77d9cf09aa43c4a284be39e5796524850715c0 ,
and it's still wrong in master.
in: lib/mongoid/fields.rb
# Returns the default values for the fields on the document. # # @exampleGet the defaults. # Person.defaults # # @return [ Hash ] The field defaults. def defaults @defaults||= [] end
in: spec/unit/mongoid/fields_spec.rb
require "spec_helper" describe Mongoid::Fields do describe ".defaults" do it "returns a hash of all the default values" do Game.defaults.should eq([ "high_score", "score" ]) end end