Skip to content

Commit

Permalink
Fix: do not return a diffrent object at each call
Browse files Browse the repository at this point in the history
  • Loading branch information
senhalil committed Mar 1, 2021
1 parent a6d095a commit 6b6809d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def self.has_many(name, options = {})
super

define_method(name) do
self[name] || []
self[name] ||= []
end

define_method("#{name}=") do |vals|
Expand Down

0 comments on commit 6b6809d

Please sign in to comment.