一切都有效,除非我尝试进行大规模任务时得到:
"undefined method `attr_accesible' for Friend:Class"
型号,friend.rb:
class Friend
include Mongoid::Document
field :first_name, :type => String
field :last_name, :type => String
field :adjective, :type => String
attr_accessible :first_name, :last_name, :adjective
end
development:
sessions:
default:
database: first_development
hosts:
- localhost:27017
options:
options:
test:
sessions:
default:
database: first_test
hosts:
- localhost:27017
options:
consistency: :strong
max_retries: 1
retry_interval: 0
Run Code Online (Sandbox Code Playgroud)
思考?