Skip to content
Snippets Groups Projects
Unverified Commit 4c0bb0b4 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix

parent 18bd4be8
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ class PolymorphicObjectFinder
key_type = "#{key}_type".to_sym
model_name = only.any? ? only.detect { |item| item == params[key_type] } : params[key_type]
return if model_name.nil?
model = model.constantize
model = model_name.constantize
id = params[key_id]
model.where(university: university).find(id)
end
......
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