Skip to content

Commit

Permalink
Use "id"
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 6, 2017
1 parent 383ed51 commit cabb8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/groonga_client_model/record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def all
end

def find(id)
if id.respond_to?(:_id)
id = id._id
if id.respond_to?(:id)
id = id.id
end
record = select.filter("_id == %{id}", id: id).limit(1).first
if record.nil?
Expand Down

0 comments on commit cabb8f9

Please sign in to comment.