Skip to content

Commit

Permalink
Fix: `serialize': wrong number of arguments (given 2, expected 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
khiav reoy committed Sep 9, 2024
1 parent ef07042 commit 3ba6c37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/active_record/support/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# frozen_string_literal: true
class User < ActiveRecord::Base
serialize :serialized_attribute, Hash
if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('7.1.0')
serialize :serialized_attribute, Hash
else
serialize :serialized_attribute, type: Hash
end

mount_uploader :profile_pic, ProfilePictureUploader
mount_uploader :pet_pic, PetPictureUploader
has_many :posts
Expand Down

0 comments on commit 3ba6c37

Please sign in to comment.