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>
2 lines
113 B
Plaintext
2 lines
113 B
Plaintext
App.Flaggable.update("<%= dom_id(@proposal) %>", "<%= j render("shared/flag_actions", flaggable: @proposal) %>")
|