Files
grecia/app/views/debates/_refresh_flag_actions.js.erb
Javi Martín 31b65679c3 Extract partial to render flag actions
The main obstacle to extract this partial was probably the paths for the
flag and unflag actions.

Now that we use Rails 5.1 `resolve` method to handle nested resources,
we can use `polymorphic_path`.

Also note the code is a bit ugly because comments render a divider. We
should probably use a CSS border instead.

Co-Authored-By: taitus <sebastia.roig@gmail.com>
2020-07-07 23:39:21 +02:00

2 lines
110 B
Plaintext

App.Flaggable.update("<%= dom_id(@debate) %>", "<%= j render("shared/flag_actions", flaggable: @debate) %>");