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>
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
<%= link_to t("debates.show.comments", count: @debate.comments_count), "#comments" %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="js-flag-actions">
|
||||
<%= render "debates/flag_actions", debate: @debate %>
|
||||
</span>
|
||||
<%= render "shared/flag_actions", flaggable: @debate %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<%= auto_link_already_sanitized_html wysiwyg(@debate.description) %>
|
||||
|
||||
Reference in New Issue
Block a user