Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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.
base fork: mongoid/mongoid
...
head fork: mongoid/mongoid
Checking mergeability… Don't worry, you can still create the pull request.
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.
bfbf4ab
@durran durran Move changes on persisted children when parent was new post-callbacks…
…. Fixes #1547.
328f11f
@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 #… 39b1a73
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.
216314d
@durran durran Allow existing array fields to be set to nil and not just emptied. Fi…
…xes #1580.
2671d32
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 #… 6267fb8
@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.
ca38261
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.
f569af0
@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
5ade1fc
@durran durran Criteria#first and #last can now eager load:
- Will perform eager loading if includes was specified.
- Part 1 of #1535.
6f48d38
@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 #… a713c73
@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.
a61fb63
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 #… a515e7d
@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 #… 9eb5d49
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.
40bd4e6
@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.
4499f25
@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.
f6fd9b4
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.
b81fc5b
@durran durran Merge pull request #1628 from romanbsd/include_type_config
Include type config
f99cd82
@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.
e88df20
@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 Mongoid.observer.disable :all.
Fixes #1639.
Note: It seems to work for activerecord too, but they didn't
overwritten disabled_for?. Dunno how they did the trick.
71df646
@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
4f9bdf7
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
75e19f9
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.
38d36a2
@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.
b613653
@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.
ef24c83
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.
2047006
@durran durran Allow non namespaced models in subdirs to get indexed via rake task. …
…Fixes #1681.
6609b6a
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
5bfe9d8
@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.
f817388
@durran durran Fix === comparison between classes and instances of subclasses. Fixes #… 86f4380
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
7aedb68
Commits on Feb 22, 2012
@shingara shingara add information about which locale is blank in validate_presence_of o…
…n localize field
21da38c
@durran durran Merge pull request #1747 from shingara/issue-1746
add information about which locale is blank in validate_presence_of on localize field
d7664e3
@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.
dca9e60
@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
305a6af
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 #… 21087ed
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.
2fb27ea
@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'
acd724b
@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…
…tion
51f43c0
@durran durran Merge pull request #1801 from lewinski/connection-options-fix
Additional filtering for database connection options
4d76114
@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.
e136f00
@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
ce0bf57
@durran durran Fixing 1.8 6fa56bf
@durran durran Reindex and removed destroyed embedded document from unscoped. Fixes #… 82e2536
@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
@durran durran Mark start of 2.4.8 463be75
Commits on Mar 22, 2012
@durran durran Add use_activesupport_time_zone to options blacklist. Fixes #1800 b931aaa
Commits on Mar 28, 2012
Chris Micacchi update_attributes specs for embedded sub-documents
This relates to issue #1868
878126a
Commits on Mar 29, 2012
@durran durran Providing fix for failing specs in #1869. Fixes #1868, Closes #1869. 73a744d
@durran durran Add issue section to current release d368d12
@durran durran Add version into require 8a3ecf9
@durran durran Apply post processed defaults after bind on relation.build. Fixes #1866. 1439b76
@durran durran Fix 1.8 failure f23dfa3
Commits on Mar 30, 2012
@noniq noniq Fix bug in nested attributes with reject_if all_blank and _destroy.
REJECT_ALL_BLANK_PROC does not work correctly when _destroy has a non-blank,
non-truthy value (like "0" or "false"). This can happen when using a hidden
form field instead of a checkbox, for example.

See https://github.com/rails/rails/blob/master/activerecord/lib/active_record/nested_attributes.rb#L223
26072db
@durran durran Update changelog and formatting fa7711d
@durran durran Fix for 1.8 e3cb9b1
@durran durran More 1.8 syntax fixes 22ccd56
Commits on Apr 03, 2012
@durran durran Dont cascade callbacks to children that don't define it. Fixes #1887. 349d12a
Commits on Apr 04, 2012
@durran durran Don't expand duplicate id criteria into $and expressions. Fixes #1882. b20e750
@durran durran Include Criteria.only and without default values
exclusion when iterating criteria, not just first and last. Fixes #1878.
22b09ea
Commits on Apr 10, 2012
@durran durran Reconnect on not master operation erros. Fixes #1892. 765b074
@durran durran Update changelog 9fe9b69
Commits on Apr 14, 2012
@i0rek i0rek Uniqueness validation ignores the default scope.
Fixes #1913.
606ad0a
@durran durran Fix specs on 2.4.0 for uniqueness validation e349461
@durran durran Fix 1.8 failures df9e11f
Commits on Apr 16, 2012
@i0rek i0rek Reimplement Collection#drop.
Fixes #1919. The collection now sets @master to nil if collection is
dropped.
4a4b2b6
@durran durran Merge pull request #1922 from i0rek/drop
Reimplement Collection#drop.
88c93eb
Commits on Apr 17, 2012
@durran durran Update changelog 5c8a3ba
@durran durran Correct appending on embedded relations. e4b3a05
@durran durran Update changelog f8d87da
Commits on Apr 19, 2012
@i0rek i0rek Expand nested complex criteria inside an array.
Fixes #1930.
8d5f2b2
Commits on Apr 20, 2012
@durran durran Merge pull request #1934 from i0rek/expand
Expand nested complex criteria inside an array.
c974b4f
@durran durran Update changelog 7aa4eb5
@durran durran Fix proxy extension. Fixes #1933 d8e10c1
@durran durran Fix 1.8. failures 77c245a
Commits on Apr 22, 2012
@durran durran Length validation now works with localized fields 6a8b5d6
@durran durran Fix 1.8 errors cddc424
Commits on Apr 23, 2012
@durran durran Use $pull with id match instead of $pullAll on embeds_many nested
attributes delete. Fixes #1928.
0113ccd
@durran durran Bit by 1.8 yet again. 770f7b4
Commits on Apr 24, 2012
@durran durran Ensure numericality validation of big decimals. Fixes #1943 b303acb
@durran durran Move spec to functional fc25a6d
@durran durran Ensure foreign keys are set regardless of binding state. Closes #1778. d297501
@durran durran Rerun specs on travis 0464c02
@durran durran Stubbing sleep is busting up ubuntu 26093bb
@durran durran Ensure proper handling of double conflicting pushes. Fixes #1936. cff105b
@durran durran Whitespace cleanup ff57b1a
@durran durran Fix spec on 1.8 1fb01c2
@durran durran Bump to 2.4.9 d8c7bf0
@durran durran One last 1.8 fix 707831f
@durran durran Really, the last 1.8 fix 39f32f9