Use buttons to destroy drafts and questions
As mentioned in commits5311daadfandbb958daf0, using links combined with JavaScript to generate POST (or, in this case, DELETE) requests to the server has a few issues.
This commit is contained in:
@@ -24,9 +24,9 @@ module ActionDispatch::Routing::UrlFor
|
||||
end
|
||||
|
||||
def namespaced_polymorphic_path(namespace, resource, options = {})
|
||||
if %w[Budget::Group Budget::Heading Poll::Booth Poll::BoothAssignment Poll::Officer
|
||||
Poll::Question Poll::Question::Answer Poll::Question::Answer::Video Poll::Shift
|
||||
SDG::LocalTarget].include?(resource.class.name)
|
||||
if %w[Budget::Group Budget::Heading Legislation::DraftVersion Legislation::Question
|
||||
Poll::Booth Poll::BoothAssignment Poll::Officer Poll::Question Poll::Question::Answer
|
||||
Poll::Question::Answer::Video Poll::Shift SDG::LocalTarget].include?(resource.class.name)
|
||||
resolve = resolve_for(resource)
|
||||
resolve_options = resolve.pop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user