Skip to content

Commit

Permalink
Removing todos
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed May 27, 2012
1 parent 0c8d4d3 commit 2f366ea
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
3 changes: 0 additions & 3 deletions lib/mongoid/atomic.rb
Expand Up @@ -262,9 +262,6 @@ def delayed_atomic_pulls
# @example Get the atomic paths.
# document.atomic_paths
#
# @todo: Durran: Should probably raise error for embedded docs w/o
# metadata.
#
# @return [ Object ] The associated path.
#
# @since 2.1.0
Expand Down
2 changes: 0 additions & 2 deletions lib/mongoid/config.rb
Expand Up @@ -73,8 +73,6 @@ def connect_to(name)

# Purge all data in all collections, including indexes.
#
# @todo Durran: clean up.
#
# @example Purge all data.
# Mongoid::Config.purge!
#
Expand Down
4 changes: 0 additions & 4 deletions lib/mongoid/contextual/mongo.rb
Expand Up @@ -378,8 +378,6 @@ def apply_limit

# Map the sort symbols to the correct MongoDB values.
#
# @todo: Durran: Temporary.
#
# @example Apply the sorting params.
# context.apply_sorting
#
Expand All @@ -392,8 +390,6 @@ def apply_sorting

# Map the inverse sort symbols to the correct MongoDB values.
#
# @todo: Durran: Temporary.
#
# @example Apply the inverse sorting params.
# context.apply_inverse_sorting
#
Expand Down
21 changes: 6 additions & 15 deletions lib/mongoid/dirty.rb
Expand Up @@ -127,38 +127,29 @@ def remove_change(name)
# Gets all the new values for each of the changed fields, to be passed to
# a MongoDB $set modifier.
#
# @todo: Durran: Refactor 3.0
#
# @example Get the setters for the atomic updates.
# person = Person.new(:title => "Sir")
# person.title = "Madam"
# person.setters # returns { "title" => "Madam" }
#
# @return [ Hash ] A +Hash+ of atomic setters.
#
# @since 2.0.0
def setters
modifications = {}
mods = {}
changes.each_pair do |name, changes|
if changes
old, new = changes
field = fields[name]
key = atomic_attribute_name(name)
if field && field.resizable?
field.add_atomic_changes(
self,
name,
key,
modifications,
new,
old
)
field.add_atomic_changes(self, name, key, mods, new, old)
else
unless atomic_unsets.include?(key)
modifications[key] = new
end
mods[key] = new unless atomic_unsets.include?(key)
end
end
end
modifications
mods
end

private
Expand Down
2 changes: 0 additions & 2 deletions lib/mongoid/relations/nested_builder.rb
Expand Up @@ -57,8 +57,6 @@ def update_only?

# Convert an id to its appropriate type.
#
# @todo Durran: Move this into a common reusable place.
#
# @example Convert the id.
# builder.convert_id(Person, "4d371b444835d98b8b000010")
#
Expand Down
2 changes: 0 additions & 2 deletions lib/mongoid/relations/synchronization.rb
Expand Up @@ -36,8 +36,6 @@ def synced

# Has the document been synced for the foreign key?
#
# @todo Change the sync to be key based.
#
# @example Has the document been synced?
# document.synced?
#
Expand Down

0 comments on commit 2f366ea

Please sign in to comment.