Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Commit

Permalink
fix nil.id error in new debugging log message
Browse files Browse the repository at this point in the history
  • Loading branch information
cap10morgan committed Jun 4, 2013
1 parent bf993ce commit f367731
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/hat_trick/step_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ def before_callbacks
end

def run_before_callback(context, model)
Rails.logger.info "Running before callback for #{name} with model id #{model.id}"
log_msg = if model
"Running before callback for #{name} with model id #{model.id}"
else
"Running before callback for #{name}"
end
Rails.logger.info log_msg
run_callbacks(before_callbacks, context, model)
end

Expand Down

0 comments on commit f367731

Please sign in to comment.