Skip to content
Snippets Groups Projects
Commit 6593b2db authored by Yorick Peterse's avatar Yorick Peterse
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment