Skip to content

Commit e12704e

Browse files
author
khiav reoy
committed
Fix: `serialize': wrong number of arguments (given 2, expected 1)
1 parent 040c31e commit e12704e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/lib/models/user.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# frozen_string_literal: true
22

33
class User < ActiveRecord::Base
4-
serialize :serialized_attribute, Hash
4+
if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('7.1.0')
5+
serialize :serialized_attribute, Hash
6+
else
7+
serialize :serialized_attribute, type: Hash
8+
end
59

610
has_many :posts
711

0 commit comments

Comments
 (0)