Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on Jan 09, 2012
@durran durran Fallback to dev environment when no env configured. Fixes #1568. 2078c8a
@durran durran Add rdoc 8f7ee85
@durran durran Remove internal strategy class due to conflicts. Fixes #1557 fb80a11
@durran durran Forgot about #1422. For non-rack applications set MONGOID_ENV (#1568). 02d90af
Commits on Jan 10, 2012
@durran durran Add spec refactor list to gitignore 14005fb
@durran durran Don't hit database on uniqueness validation if the field has not chan…
…ged. Fixes #1576.
@durran durran Move changes on persisted children when parent was new post-callbacks…
…. Fixes #1547.
@i0rek i0rek Create accessor and dirty methods for name and alias. 2994efa
@durran durran Update changelog for #1578. Fixes #1571 0b577d1
@durran durran Fix failing specs on travis cf894f7
@durran durran Don't call #to_a on individual set field elements in criterion. Fixes…
… #1579.
Commits on Jan 11, 2012
@durran durran Use class_eval or define_method where appropriate:
- We always prefer the use of class_eval for creating the accessors for
  performance and memory management, however when a field or foreign key
  is defined in a non-standard way we need to handle this with
  define_method instead.
- Fixes #1565.
@durran durran Allow existing array fields to be set to nil and not just emptied. Fi…
…xes #1580.
Commits on Jan 12, 2012
@durran durran Allow nil values to get set into arrays. Fixes #1582. e269b5e
@durran durran Documents should respond to the setter of a dynamic attribute. Fixes …
@durran durran Cleanup respond_to and reader methods 60ebff7
@durran durran Adding spec that show's issue #1587 is working correctly on the 2.4.0…
… branch.
Commits on Jan 13, 2012
@durran durran Adding in spec for #1590 32c250d
@durran durran Allow assignment of empty array to HABTM when no docs are loaded from…
… the relation into memory. Fixes #1589.
@durran durran Document#changed? returns true now if only children change:
- Also added Document#children_changed? to determine if any of the
  embedded documents have been altered.
- Fixes #1551
@durran durran Criteria#first and #last can now eager load:
- Will perform eager loading if includes was specified.
- Part 1 of #1535.
@durran durran Fix issue number 1541115
@durran durran Remove the print out 4faa1dc
Commits on Jan 14, 2012
@durran durran Allow atomic set from explicit nil on array to new values. Fixes #1587 4be33fe
@durran durran Don't swallow mongo exceptions in the create_indexes rake task. Fixes…
… #1592
@durran durran Fix travis failure 8202839
Commits on Jan 15, 2012
@durran durran Allow embedded arrays to properly get updated atomically. Fixes #1593 82274e3
@i0rek i0rek Typecast $or conditions. 2454826
@durran durran Bump version to 2.4.1 0be69bf
@durran durran Update changelog 52d4b6e
@durran durran Begin 2.4.2 development (fixes) 5be3127
@durran durran Serialize boolean values in criteria when nested inside a defined arr…
…ay. Fixes #1590.
Commits on Jan 16, 2012
@durran durran Don't error on uniqueness validation of a relation. Fixes #1600 082818c
@durran durran Array fields can be reordered with the same elements. Fixes #1597 c75cecd
@durran durran Dirty arrays should not be so clever if not a foreign key on habtm c9e35d3
@durran durran Enumerable targets should always yield to in memory docs first. Fixes…
… #1599.
@durran durran Remove the puts in method missing 835c71a
Commits on Jan 17, 2012
@i0rek i0rek Preserve the structure while going through the values. f79bee1
@durran durran Update changelog 3fd06e3
Commits on Jan 18, 2012
@durran durran Remove deprecation warning in rescue responses for rails 3.2. Fixes #…
Commits on Jan 19, 2012
@durran durran Remove watchr and replace with guard on 2.4.0 branch 9aa58b8
@durran durran Raise DocumentNotFound instead of NoMethodErros:
- When passing ids to nested attributes and no docs exist, grabbing the
  first class could throw a NoMethodError getting the object id state.
- Fixes #1608.
@durran durran Hard delete paranoid versioned documents:
- When setting max_versions, paranoid documents that are in the embedded
  versions relation need to be hard deleted.
- Fixes #1610.
@durran durran Fix broken version spec 02bd401
Commits on Jan 20, 2012
@durran durran Allow 1 main location for mongoid spec run host and port connection i…
…nfo. Fixes #1615.
Commits on Jan 22, 2012
@durran durran Add relation proxy methods to prohibited fields. Fixes #1617 0a54fac
@durran durran Allow connection retries on cursor iteration. Closes #1609. 9dd2477
@durran durran Bringing localized format validation over to 2.4.2. f85fd55
@romanbsd romanbsd Add include_type_for_serialization setting
Mongoid.include_type_for_serialization controls whether the _type
field is included when the model is serialized.
@durran durran Merge pull request #1628 from romanbsd/include_type_config
Include type config
@durran durran Flag the start of 2.4.3 5e2cc44
@DouweM DouweM Fix $all matcher. 9623c66
@DouweM DouweM Add support for matching $in and $all with Regexp values. 06975a5
@DouweM DouweM Fix $size spec for new size of services array. 9cdf470
@durran durran Update changelog 7e0df20
@durran durran Remove warnings and fix copyable 8c1f0a5
Commits on Jan 23, 2012
@i0rek i0rek Default scope no longer breaks versioning!
Described and solved here: #1623.
@durran durran Update changelog b60e1f6
Commits on Jan 24, 2012
@cgriego cgriego Fix rescue_responses in Rails 3.2, broken by #1605 8017929
@durran durran Merge in scope fixes and fix version specs a27cb77
Commits on Jan 25, 2012
@durran durran Set update consumers to the collection name, not the class. Fixes #1640 0a6cd67
@i0rek i0rek Fix :all.
Fixes #1639.
Note: It seems to work for activerecord too, but they didn't
overwritten disabled_for?. Dunno how they did the trick.
@i0rek i0rek Fix hash syntax. d6abbd7
@durran durran Fix broken specs on travis for 1.9 syntax 42acd80
Commits on Jan 28, 2012
@durran durran Fix DateTime serialization when using UTC:
- When setting DateTimes with Mongoid.use_utc set to true, the actual
  times should not get changed to local and back.
- Fixes #1647
Commits on Jan 30, 2012
@semaperepelitsa semaperepelitsa Store module as a constant, not as a string d5d329f
@semaperepelitsa semaperepelitsa klass.to_s.constantize equals klass 6d35e4d
@semaperepelitsa semaperepelitsa Use const_get 3d4319c
@semaperepelitsa semaperepelitsa No need to re-get constant from the module that is already there 7f2ce31
@semaperepelitsa semaperepelitsa This is not an exception, this is expected a1ac934
@semaperepelitsa semaperepelitsa Better readability 5669779
@semaperepelitsa semaperepelitsa Make control flow more obvious by getting rid of multiple returns 0cb957f
@semaperepelitsa semaperepelitsa Use the actual constant since we don't need it's string representation e2cf96f
@semaperepelitsa semaperepelitsa According to the test demodulize is not required here 26c7900
@durran durran Merge pull request #1655 from semaperepelitsa/mappings_for_refactoring
Mappings.for refactoring
Commits on Jan 31, 2012
@priyaaank priyaaank #1656 - As per the change done in #1576, we skip db call for uniquene…
…ss validation if the attribute value hasn't changed. However we need to make sure, that db callback is skipped when both scope reference and attribute value has not changed; else uniqueness constraint can be violated withoiut raising an error. Fixed the code to check for scope changes too.
@durran durran Update changelog 8855647
Commits on Feb 02, 2012
@rymai rymai Ensure Mongoid.logger is not nil before calling warn on it. 2f8e7aa
Commits on Feb 03, 2012
@durran durran Merge pull request #1668 from rymai/fix_logger_issue-2.4.0-stable
Ensure Mongoid.logger is not nil before calling warn on it.
@durran durran Update changelog b29f9d6
Commits on Feb 05, 2012
@durran durran Update changelog 3fb8c27
@i0rek i0rek Expand nested complex criteria.
Make sure even nested complex criterias were
expanded correct. Fixes #1665.
Commits on Feb 06, 2012
@gerad gerad failing spec 58c236e
@durran durran Clear delayed atomic sets before substitution. Fixes #1659 5b06944
@durran durran Ensure uniqueness validation works for clones. Fixes #1661. 63c78b4
@durran durran Allow eager loading to work as a default scope. Fixes #1676. e8dc658
@durran durran Don't overwrite persisted fields after only/without limitation:
- If a field has a default value defined and it is persisted with a
  value other than the default, the value will no longer get overwritten
  by the default if loaded again with field limitations and saved.
- Fixes #1205.
- Fixes #1642.
@durran durran Allow non namespaced models in subdirs to get indexed via rake task. …
…Fixes #1681.
Commits on Feb 09, 2012
@durran durran Add passing spec for #1689. 036f826
@durran durran Binding belongs to sets metadata on bind and unbind. Fixes #1686 0a397bb
Commits on Feb 11, 2012
@lucasas lucasas Versioning updated_at attribute:
- Generate a new document version unless the changed attributes
  include only updated_at
@durran durran Fix 1.8 syntax errors 9326ad1
@durran durran Allow reordering of many to many foreign keys. Fixes #1705. 160a548
Commits on Feb 13, 2012
@durran durran Flag 2.4.4 8443097
@durran durran Fix super outside of method errors on broken 1.8.7 rubies. Closes #1495. adbd331
@durran durran rescue both name error and load error. Closes #1681. 808dfbe
@durran durran Mark start of 2.4.5 dev 1bf4b7b
@robinst robinst Allow reordering of foreign keys even with pulls/pushes
When there were pushes (or pulls) as well as elements being reordered,
save would only push (or pull) elements. The changed order of the other
elements were lost.

With this change, checking is done to ensure that we only push when the
new elements are at the end, and pull when the remaining element's order
has not changed.
@durran durran Fix === comparison between classes and instances of subclasses. Fixes…
… #1713.
Commits on Feb 14, 2012
@blt04 blt04 Add embedded serialization without includes specs 0428ef5
@durran durran Serializable has returns embedded documents pre and post save. Fixes #… 5588679
Commits on Feb 15, 2012
@durran durran Fixing serialization after as_document changes c00b997
Commits on Feb 16, 2012
@durran durran Don't call changed on children during initialize callbacks. Fixes #1723 ad11f60
Commits on Feb 18, 2012
@durran durran Add support for embeds_many when querying Enumerable:
- Add some tests, use duck typing
- Prefer array check of exceptions as control flow
Commits on Feb 22, 2012
@shingara shingara add information about which locale is blank in validate_presence_of o…
…n localize field
@durran durran Merge pull request #1747 from shingara/issue-1746
add information about which locale is blank in validate_presence_of on localize field
@durran durran Update changelog 24b3333
@durran durran Fix 1.8 failure - hashes have no order fd79935
@durran durran Sort for localized fields, too.
Fixes #1744.
@durran durran Update changelog 2abccbb
@durran durran Mongoid's logger must respond to level. Fixes #1751. 5f236a7
@Flameeyes Flameeyes Add one missing replacement of localhost vs envvar 78742c8
Commits on Feb 23, 2012
@durran durran Merge pull request #1755 from Flameeyes/2.4.0-stable
Add one missing replacement of localhost vs envvar
Commits on Feb 24, 2012
@durran durran Fix json serialization of attributes that need conversion. Fixes #1757. 69e7e4b
@durran durran Ensure serialization passes options through to embedded docs. Fixes #…
Commits on Feb 25, 2012
@durran durran Metadata#options returns self. Fixes #1758 92d7318
Commits on Feb 26, 2012
@durran durran Convert localized fields in any_of criterion. Fixes #1762 ea342a6
Commits on Feb 28, 2012
@i0rek i0rek Document#update_attributes accepts additional options hash.
In Rails >3.1.0 updates_attributes accepts an additional options hash
so we do, too. Its used for mass assignment security.
@durran durran Update changelog after cherry pick for update_attributes. Closes #1767. 54f641d
@byroot byroot Cast #limit() and #skip() arguments as Integer
To avoid raising ArgumentError deep inside Mongo's driver:
`MyModel.limit("2").to_a` =>

mongo-1.5.2/lib/mongo/cursor.rb:272:in `>'
mongo-1.5.2/lib/mongo/cursor.rb:272:in `batch_size'
mongo-1.5.2/lib/mongo/cursor.rb:80:in `initialize'
mongo-1.5.2/lib/mongo/collection.rb:236:in `new'
mongo-1.5.2/lib/mongo/collection.rb:236:in `find'
mongoid-2.4.4/lib/mongoid/collections/master.rb:25:in `block in find'
mongoid-2.4.4/lib/mongoid/collections/retry.rb:29:in `retry_on_connection_failure'
mongoid-2.4.4/lib/mongoid/collections/master.rb:24:in `find'
mongoid-2.4.4/lib/mongoid/collection.rb:42:in `find'
mongoid-2.4.4/lib/mongoid/contexts/mongo.rb:175:in `block in execute'
mongoid-2.4.4/lib/mongoid/contexts/mongo.rb:478:in `selecting'
mongoid-2.4.4/lib/mongoid/contexts/mongo.rb:169:in `execute'
mongoid-2.4.4/lib/mongoid/contexts/mongo.rb:261:in `iterate'
mongoid-2.4.4/lib/mongoid/criteria.rb:145:in `block in each'
mongoid-2.4.4/lib/mongoid/criteria.rb:145:in `tap'
mongoid-2.4.4/lib/mongoid/criteria.rb:145:in `each'
@durran durran Update changelog 92c4bfa
Commits on Feb 29, 2012
@durran durran Fixing certain spec breakages with regards to generators a99f4ae
Commits on Mar 05, 2012
@durran durran Update to 2.4.6 18fddeb
Commits on Mar 06, 2012
@durran durran Case equality has been fixed to handle instance checks. Fixes #1785 e29998c
Commits on Mar 08, 2012
@lewinski lewinski Fix warnings caused by passing host and port through to Mongo::Connec…
@durran durran Merge pull request #1801 from lewinski/connection-options-fix
Additional filtering for database connection options
@durran durran Filter out invalid options from the MongoDB connection. Fixes #1800 543e4d4
Commits on Mar 10, 2012
@durran durran Add passing spec for #1809 661b8e2
@durran durran Use 1.8 syntax b5c451c
Commits on Mar 15, 2012
@durran durran Dont cascade after_initialize callbacks - they're happening anyways. …
…Fixes #1814.
@durran durran 1.8 syntax fix 08170f5
Commits on Mar 20, 2012
@durran durran Blacklist hosts from options 0d9f164
@durran durran Symbolize all keys for the ruby driver - it no likey the strings 4b08c30
@durran durran Update changelog 1415fdb
@durran durran Ensure 0 length and size on loaded and unloaded docs takes into accou…
…nt all added docs. Fixes #1836
@durran durran Fixing 1.8 6fa56bf
@durran durran Reindex and removed destroyed embedded document from unscoped. Fixes …
@durran durran Nabbed by 1.8 yet again. e50dec5
Commits on Mar 21, 2012
@durran durran Ensure reloading of embedded documents retain reference to the parent a751f1f
@durran durran Add extra nil check 9d24547
@durran durran Lax the time frame for rubinius 80a3552
@durran durran Update changelog to reflect end of 2.4.7 7772617