Files
fizzy/app/views/boosts/_boosts.html.erb
T
Jose Farias e117f4e5af boost_count -> boosts_count
This aligns better with counter_cache conventions, in case we turn boosts into a model later
2024-11-19 14:22:51 -06:00

15 lines
604 B
Plaintext

<%= tag.div class: "bubble__bubble bubble__meta bubble__boosts",
data: {
controller: "animation toggle-class",
animation_play_class: "boosting",
toggle_class_toggle_class: "boosting",
action: "animationend->toggle-class#toggle" },
hidden: !bubble.boosts_count.positive? do %>
<%= button_to bucket_bubble_boosts_path(bubble.bucket, bubble),
class: "btn btn--plain",
data: { action: "toggle-class#toggle" },
form_class: "full-width" do %>
<%= tag.span("+ #{bubble.boosts_count}") if bubble.boosts_count.positive? %>
<% end %>
<% end %>