This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The problem with the Github issues is a tradeoff. In order for MongoDB to officially | |
support Mongoid we need to have the issues in Jira in order to properly adhere to our | |
commercial support contracts with respect to response times, as well as free support. | |
There's no simple way to setup 301 redirects from the old Github issues to the new Jira issues, | |
but every single Github issue was migrated - over 4000 since the project's inception in | |
2009 and all are public (https://jira.mongodb.org/browse/MONGOID). Google will eventually | |
resolve them. It's better in the short and long term to give up some of this to have Mongoid | |
officially supported and actively developed. | |
As for the documentation, the separation of the Mongoid 5 docs and the 3/4 docs was to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyObject | |
def to_bson(encoded = ''.force_encoding(BINARY)) | |
to_hash.to_bson(encoded) | |
end | |
def self.from_bson(bson) | |
new(Hash.from_bson(bson)) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mongoid.models.each do |model| | |
model.fields.each do |name, field| | |
# name is the string name of the field, field is the Field object. | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.bson; | |
import java.io.IOException; | |
import org.jruby.Ruby; | |
import org.jruby.RubyModule; | |
import org.jruby.RubyString; | |
import org.jruby.anno.JRubyMethod; | |
import org.jruby.runtime.builtin.IRubyObject; | |
import org.jruby.runtime.load.BasicLibraryService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
sessions: | |
default: | |
database: mongoid_test | |
hosts: | |
- localhost:27017 | |
options: | |
consistency: :strong | |
max_retries: 30 | |
retry_interval: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
adapter: master_slave | |
connection_adapter: mysql2 | |
database: myapp_procuction | |
username: myappuser | |
password: myapppass | |
master: | |
host: masterhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
module Rack | |
module Mongoid | |
module Middleware | |
class Sessions | |
def initialize(app) | |
@app = app | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cte_attr(*attrs) | |
attrs.each do |name| | |
class_eval <<-ATTR | |
def #{name}=(value) | |
@#{name} = value | |
super | |
end | |
ATTR | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcp4 0 0 localhost.27017 localhost.50942 ESTABLISHED | |
tcp4 0 0 localhost.50942 localhost.27017 ESTABLISHED | |
tcp4 0 0 localhost.27017 localhost.50941 ESTABLISHED | |
tcp4 0 0 localhost.50941 localhost.27017 ESTABLISHED | |
tcp4 0 0 localhost.27017 localhost.50940 ESTABLISHED | |
tcp4 0 0 localhost.50940 localhost.27017 ESTABLISHED | |
tcp4 0 0 localhost.27017 localhost.50939 ESTABLISHED | |
tcp4 0 0 localhost.50939 localhost.27017 ESTABLISHED | |
tcp4 0 0 localhost.27017 localhost.50938 ESTABLISHED | |
tcp4 0 0 localhost.27017 localhost.50937 ESTABLISHED |
NewerOlder