Skip to content

Commit

Permalink
Minor code comment changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Savage committed Feb 13, 2012
1 parent adedcf8 commit 2cc4168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/composite_primary_keys/relation/finder_methods.rb
Expand Up @@ -82,8 +82,10 @@ def find_with_ids(*ids, &block)
# find('1,2', '3,4') -> ['1,2','3,4']

# Normalize incoming data. Note the last arg can be nil. Happens
# when find is called with nil options like the reload method does.
# when find is called with nil options which is then passed on
# to find_with_ids.
ids.compact!

ids = [ids] unless ids.first.kind_of?(Array)

results = ids.map do |cpk_ids|
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/dorm.rb
@@ -1,3 +1,3 @@
class Dorm < ActiveRecord::Base
has_many :rooms, :include => :room_attributes, :primary_key => [:id]
has_many :rooms, :include => :room_attributes, :primary_key => [:id]
end

0 comments on commit 2cc4168

Please sign in to comment.