Skip to content

Commit

Permalink
Remove code path for Rails 5.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-burns committed Dec 29, 2023
1 parent 499635f commit c4638f6
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/factory_bot_rails/factory_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,9 @@ def run
private

def validate_compiled_factory
if Rails.version >= "6.0"
rails_6_0_support
else
rails_5_2_support
end
end

def rails_6_0_support
proc do |event|
@validators.each { |validator| validator.validate!(event.payload) }
end
end

def rails_5_2_support
proc do |*notification_event_arguments|
event = ActiveSupport::Notifications::Event.new(*notification_event_arguments)

rails_6_0_support.call(event)
end
end
end
end

0 comments on commit c4638f6

Please # to comment.