Commit 6593b2db authored by Yorick Peterse's avatar Yorick Peterse

Merge branch 'blackst0ne-rails5-update-event-subclass-from-attributes' into 'master'

[Rails5] Update Event#subclass_from_attributes method

See merge request gitlab-org/gitlab-ce!18312
parents 8f0e9e01 c57cddf5
......@@ -110,7 +110,10 @@ class Event < ActiveRecord::Base
end
end
# Remove this method when removing Gitlab.rails5? code.
def subclass_from_attributes(attrs)
return super if Gitlab.rails5?
# Without this Rails will keep calling this method on the returned class,
# resulting in an infinite loop.
return unless self == Event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment