Skip to content

Commit

Permalink
fix: explicit nil to #compile for Rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnesthesia committed Oct 18, 2023
1 parent 06b0f32 commit b19a2ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/activerecord-import/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def valid_model?(model)
runner.invoke_after(env)
end
elsif @validate_callbacks.method(:compile).arity == 0 # ActiveRecord = 4.0
model.instance_eval @validate_callbacks.compile
model.instance_eval @validate_callbacks.compile(nil)
else # ActiveRecord 3.x
model.instance_eval @validate_callbacks.compile(nil, model)
end
Expand Down

0 comments on commit b19a2ed

Please sign in to comment.