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 040c31e commit e12704e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/lib/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,7 +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

has_many :posts

Expand Down

0 comments on commit e12704e

Please sign in to comment.