Skip to content

Commit

Permalink
Use yield instead of explicit block. Call
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Dec 18, 2021
1 parent 8ec578d commit a52323c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/chrono_model/time_machine/history_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ module ClassMethods
# setting it now and ensuring to reset it to the original one after
# execution completes. FIXME
#
def with_hid_pkey(&block)
def with_hid_pkey
old = self.primary_key
self.primary_key = :hid

block.call
yield
ensure
self.primary_key = old
end
Expand Down

0 comments on commit a52323c

Please sign in to comment.