Make polymorphic_path work with poll shifts

This commit is contained in:
Javi Martín
2020-06-09 00:14:27 +02:00
parent 94a1865217
commit 289eb96561
3 changed files with 12 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ module ActionDispatch::Routing::UrlFor
def admin_polymorphic_path(resource, options = {})
if %w[Budget::Group Budget::Heading Poll::Booth Poll::BoothAssignment Poll::Officer
Poll::Question Poll::Question::Answer::Video].include?(resource.class.name)
Poll::Question Poll::Question::Answer::Video Poll::Shift].include?(resource.class.name)
resolve = resolve_for(resource)
resolve_options = resolve.pop