Skip to content

Commit

Permalink
move method definition to outer scope
Browse files Browse the repository at this point in the history
  • Loading branch information
funny-falcon committed Jun 19, 2012
1 parent 43d660e commit 5f0f78c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tarantool/record.rb
Expand Up @@ -288,10 +288,11 @@ def old_record!
@__new_record = false
end

def in_callbacks(&blk)
run_callbacks(:save) { run_callbacks(new_record? ? :create : :update, &blk)}
end

def save
def in_callbacks(&blk)
run_callbacks(:save) { run_callbacks(new_record? ? :create : :update, &blk)}
end
in_callbacks do
if valid?
if new_record?
Expand Down

0 comments on commit 5f0f78c

Please sign in to comment.