Я использую гем datatables (https://github.com/potatosalad/mongoid-data_table), который поддерживает MongoID,
Но исключение возникает из следующего кода
format.json do
render :json => Game.to_data_table(self)
end
Game.to_data_table(self)
INTERNAL ERROR!!! undefined method `page' for #<Array:0xb38d7bc>
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mongoid-2.2.5/lib/mongoid/criteria.rb:369:in `method_missing'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/bundler/gems/mongoid-data_table-23283e37979c/lib/mongoid/data_table/proxy.rb:47:in `collection'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/bundler/gems/mongoid-data_table-23283e37979c/lib/mongoid/data_table/proxy.rb:263:in `method_missing'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/eval.rb:47:in `block in execute'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/eval.rb:19:in `run_with_binding'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/eval.rb:46:in `execute'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:280:in `one_cmd'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:261:in `block (2 levels) in process_commands'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:260:in `each'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:260:in `block in process_commands'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:253:in `catch'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:253:in `process_commands'
/home/naveed/.rvm/gems/ruby-1.9.2-p290@rails3/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:173:in `at_line'
(eval):5:in `block in at_line'
<internal:prelude>:10:in `synchronize'
(eval):3:in `at_line'
Это мои монго монго
gem 'mongo'
gem "mongoid", "~> 2.1"
gem 'bson', '= 1.4.0'
gem 'bson_ext', '= 1.4.0'