scope content dropdowns to the same universe, if present

This commit is contained in:
Andrew Brown 2018-01-31 00:55:29 -06:00
parent 786569315f
commit 2c016ca4ac

View File

@ -26,6 +26,7 @@
f.select "#{attribute}_id",
current_user.send("linkable_#{klass.pluralize}")
.in_universe(@universe_scope)
.in_universe(@content.universe)
.sort_by(&:name)
.reject { |content| content.class.name == klass && content.id == @content.id }
.map { |c| [c.name, c.id] }