Skip to content

Commit aacc323

Browse files
johnnyshieldsp
andauthored
MONGOID-5170 - Fix more typos mostly in code docs and code comments (#5056)
* MONGOID-????: Fix more typos mostly in code docs and code comments * more fixes * MONGOID-5170 Co-authored-by: shields <[email protected]> Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 7a53b1c commit aacc323

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+104
-105
lines changed

CHANGELOG.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ For instructions on upgrading to newer versions, visit
8989

9090
### Resolved Issues
9191

92-
* \#4091 Use sublcass context when calling a scope defined in a superclass. (Edgars Beigarts)
92+
* \#4091 Use subclass context when calling a scope defined in a superclass. (Edgars Beigarts)
9393

9494
* \#4075 Made remove index logging specific to each index that was actually getting removed.
9595

@@ -107,7 +107,7 @@ For instructions on upgrading to newer versions, visit
107107

108108
* \#3993 Fixes issue where `dup`/`clone` fails for embedded documents that use store_as without using Mongoid::Atributes::Dynamic
109109

110-
* \#3991 Fixed emebdded documents not flagging as changed after calling #changed? and modifying the
110+
* \#3991 Fixed embedded documents not flagging as changed after calling #changed? and modifying the
111111
child elements.
112112

113113
* \#3874 Adding snapshot option to context.
@@ -568,7 +568,7 @@ child elements.
568568
* \#3197 Improvements in the calls to `aggregates` on root and embedded
569569
collections. (Wojciech Piekutowski)
570570

571-
* \#3144/\#3219 Fixing name colission on @_children ivar. (Arthur Neves)
571+
* \#3144/\#3219 Fixing name collision on @_children ivar. (Arthur Neves)
572572

573573
* \#3088 Range field can accept a hash, which could be the attribute from the db.
574574
(Daniel Libanori)
@@ -589,9 +589,9 @@ child elements.
589589

590590
### Resolved Issues
591591

592-
* \#3465 Fixed ambigous relation errors where inverse_of is set to nil.
592+
* \#3465 Fixed ambiguous relation errors where inverse_of is set to nil.
593593

594-
* \#3414 Backkport skip and limit options on aggregation. (Wojciech Piekutowski)
594+
* \#3414 Backport skip and limit options on aggregation. (Wojciech Piekutowski)
595595

596596
* \#3469 Fix RegexpError: failed to allocate memory: /\./ on .hash_dot_syntax? (Dmitry Krasnoukhov)
597597

@@ -628,7 +628,7 @@ child elements.
628628

629629
* \#3137 Allow multiple `belongs_to` sets in a row with ids.
630630

631-
* \#3079 Embbed docs with paranoia parents, were losing the _id when
631+
* \#3079 Embedded docs with paranoia parents were losing the _id when
632632
reloading from db, as they didnt have the right persisted? value. (Arthur Neves)
633633

634634
* \#3081 Criteria's `method_missing` now checks if an array responds to the provided
@@ -1342,7 +1342,7 @@ child elements.
13421342
* \#2411 BigDecimal fields are properly stored as strings when mongoizing
13431343
integers and floats.
13441344

1345-
* \#2409 Don't warn about missing mongoid.yml if configured programatically.
1345+
* \#2409 Don't warn about missing mongoid.yml if configured programmatically.
13461346

13471347
* \#2403 Return false on `update_all` of an embeds many with no documents.
13481348

@@ -1390,7 +1390,7 @@ child elements.
13901390

13911391
* \#2353 Allow `update_attribute` to properly handle aliased fields.
13921392

1393-
* \#2348 Conversion of strings to times should raise an arugment error if the
1393+
* \#2348 Conversion of strings to times should raise an argument error if the
13941394
string is invalid. (Campbell Allen)
13951395

13961396
* \#2346 Ensure `belongs_to` relations are evolvable when passed the proxy and
@@ -1912,7 +1912,7 @@ child elements.
19121912
criteria.merge(filter)
19131913

19141914
* \#1635 All exceptions now provide more comprehensive errors, including
1915-
the problem that occured, a detail summary of why it happened, and
1915+
the problem that occurred, a detail summary of why it happened, and
19161916
potential resolutions. Example:
19171917

19181918
(Mongoid::Errors::DocumentNotFound)
@@ -1929,7 +1929,7 @@ child elements.
19291929
false, which will cause a nil to be returned instead
19301930
of raising this error.
19311931

1932-
* \#1616 `Model.find_by` added which takes a hash of arugments to search
1932+
* \#1616 `Model.find_by` added which takes a hash of arguments to search
19331933
for in the database. If no single document is returned a DocumentNotFound
19341934
error is raised. (Piotr Jakubowski)
19351935

@@ -1990,7 +1990,7 @@ child elements.
19901990

19911991
* \#1291 Mongoid now supports any number of database connections as defined in
19921992
the mongoid.yml. For example you could have a local single server db, a
1993-
multi availablity zone replica set, and a shard cluster all in the same
1993+
multi availability zone replica set, and a shard cluster all in the same
19941994
application environment. Mongoid can connect to any session at any point in
19951995
time.
19961996

@@ -2941,7 +2941,7 @@ child elements.
29412941
* \#1463 Batch insert consumers are now scoped to collection to avoid persistence
29422942
of documents to other collections in callbacks going to the wrong place.
29432943

2944-
* \#1462 Assigning has many relations via nested attribtues `*_attributes=` does
2944+
* \#1462 Assigning has many relations via nested attributes `*_attributes=` does
29452945
not autosave the relation.
29462946

29472947
* \#1461 Fixed serialization of foreign key fields in complex criteria not to
@@ -3040,7 +3040,7 @@ child elements.
30403040

30413041
* \#1386 Lowered mongo/bson dependency to 1.3
30423042

3043-
* \#1377 Fix aggregation functions to properly handle nil or indefined values.
3043+
* \#1377 Fix aggregation functions to properly handle nil or undefined values.
30443044
(Maxime Garcia)
30453045

30463046
* \#1373 Warn if a scope overrides another scope.
@@ -3121,7 +3121,7 @@ child elements.
31213121

31223122
* \#1287 Fixed max versions limitation with versioning.
31233123

3124-
* \#1277 attribute_will_change! properly flags the attribute even if no change occured.
3124+
* \#1277 attribute_will_change! properly flags the attribute even if no change occurred.
31253125

31263126
* \#1063 Paranoid documents properly run destroy callbacks on soft destroy.
31273127

@@ -3156,7 +3156,7 @@ child elements.
31563156

31573157
* \#1256 Mongoid now can create indexes for models in Rails engines. (Caio Filipini)
31583158

3159-
* \#1228 Allow pre formatting of compsoite keys by passing a block to #key.
3159+
* \#1228 Allow pre formatting of composite keys by passing a block to #key.
31603160
(Ben Hundley)
31613161

31623162
* \#1222 Scoped mass assignment is now supported. (Andrew Shaydurov)
@@ -3236,7 +3236,7 @@ child elements.
32363236

32373237
## 2.2.4
32383238

3239-
* \#1377 Fix aggregation functions to properly handle nil or indefined values.
3239+
* \#1377 Fix aggregation functions to properly handle nil or undefined values.
32403240
(Maxime Garcia)
32413241

32423242
* \#1373 Warn if a scope overrides another scope.
@@ -3250,7 +3250,7 @@ child elements.
32503250
key without error.
32513251

32523252
* \#1350, \#1351 Fixed errors in the string conversions of double quotes and
3253-
tilde when paramterizing keys.
3253+
tilde when parameterizing keys.
32543254

32553255
* \#1349 Mongoid documents should not blow up when including Enumerable.
32563256
(Jonas Nicklas)

lib/mongoid/association/embedded/cyclic.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module ClassMethods
2525
# recursively_embeds_many
2626
# end
2727
#
28-
# @example The previous example is a shorcut for this.
28+
# @example The previous example is a shortcut for this.
2929
#
3030
# class Role
3131
# include Mongoid::Document
@@ -53,7 +53,7 @@ def recursively_embeds_many(options = {})
5353
# recursively_embeds_one
5454
# end
5555
#
56-
# @example The previous example is a shorcut for this.
56+
# @example The previous example is a shortcut for this.
5757
#
5858
# class Role
5959
# include Mongoid::Document

lib/mongoid/association/nested/one.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def initialize(association, attributes, options)
5454

5555
private
5656

57-
# Is the id in the attribtues acceptable for allowing an update to
57+
# Is the id in the attributes acceptable for allowing an update to
5858
# the existing association?
5959
#
6060
# @api private

lib/mongoid/association/one.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class One < Association::Proxy
1212
# @example Clear the relation.
1313
# relation.clear
1414
#
15-
# @return [ true, false ] If the delete suceeded.
15+
# @return [ true, false ] If the delete succeeded.
1616
def clear
1717
_target.delete
1818
end

lib/mongoid/association/referenced/counter_cache.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module CounterCache
77
extend ActiveSupport::Concern
88

99
# Reset the given counter using the .count() query from the
10-
# db. This method is usuful in case that a counter got
10+
# db. This method is useful in case that a counter got
1111
# corrupted, or a new counter was added to the collection.
1212
#
1313
# @example Reset the given counter cache
@@ -23,7 +23,7 @@ def reset_counters(*counters)
2323
module ClassMethods
2424

2525
# Reset the given counter using the .count() query from the
26-
# db. This method is usuful in case that a counter got
26+
# db. This method is useful in case that a counter got
2727
# corrupted, or a new counter was added to the collection.
2828
#
2929
# @example Reset the given counter cache

lib/mongoid/association/referenced/has_many/proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ def delete_all(conditions = nil)
124124
# @example Destroy all documents in the association.
125125
# person.posts.destroy_all
126126
#
127-
# @example Conditonally destroy all documents in the association.
127+
# @example Conditionally destroy all documents in the association.
128128
# person.posts.destroy_all({ :title => "Testing" })
129129
#
130130
# @param [ Hash ] conditions Optional conditions to destroy with.
131131
#
132-
# @return [ Integer ] The number of documents destroyd.
132+
# @return [ Integer ] The number of documents destroyed.
133133
def destroy_all(conditions = nil)
134134
remove_all(conditions, :destroy_all)
135135
end

lib/mongoid/atomic/modifiers.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def add_each_operation(mods, field, value)
136136
end
137137
end
138138

139-
# Get the $addToSet operations or intialize a new one.
139+
# Get the $addToSet operations or initialize a new one.
140140
#
141141
# @example Get the $addToSet operations.
142142
# modifiers.add_to_sets
@@ -243,7 +243,7 @@ def set_fields
243243
@set_fields ||= {}
244244
end
245245

246-
# Get the $pullAll operations or intialize a new one.
246+
# Get the $pullAll operations or initialize a new one.
247247
#
248248
# @example Get the $pullAll operations.
249249
# modifiers.pull_alls
@@ -253,7 +253,7 @@ def pull_alls
253253
self["$pullAll"] ||= {}
254254
end
255255

256-
# Get the $pull operations or intialize a new one.
256+
# Get the $pull operations or initialize a new one.
257257
#
258258
# @example Get the $pull operations.
259259
# modifiers.pulls
@@ -273,7 +273,7 @@ def pushes
273273
self["$push"] ||= {}
274274
end
275275

276-
# Get the $set operations or intialize a new one.
276+
# Get the $set operations or initialize a new one.
277277
#
278278
# @example Get the $set operations.
279279
# modifiers.sets

lib/mongoid/attributes/processing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Processing
88

99
# Process the provided attributes casting them to their proper values if a
1010
# field exists for them on the document. This will be limited to only the
11-
# attributes provided in the suppied +Hash+ so that no extra nil values get
11+
# attributes provided in the supplied +Hash+ so that no extra nil values get
1212
# put into the document's attributes.
1313
#
1414
# @example Process the attributes.

lib/mongoid/cacheable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Cacheable
1818
# If not - will append /id-updated_at.to_s(cache_timestamp_format)
1919
# Without updated_at - will append /id
2020
#
21-
# This is usually called insode a cache() block
21+
# This is usually called inside a cache() block
2222
#
2323
# @example Returns the cache key
2424
# document.cache_key

lib/mongoid/changeable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def previous_changes
9696
end
9797

9898
# Remove a change from the dirty attributes hash. Used by the single field
99-
# atomic updators.
99+
# atomic updaters.
100100
#
101101
# @example Remove a flagged change.
102102
# model.remove_change(:field)

0 commit comments

Comments
 (0)