Files
fizzy/app/controllers/bubbles/boosts_controller.rb
T
David Heinemeier Hansson c06802856e Move boosts under bubbles
But also remove the need for a bucket nesting
2025-04-06 21:04:28 +02:00

17 lines
336 B
Ruby

class Bubbles::BoostsController < ApplicationController
include BubbleScoped
def create
count = if params[:boost_count].to_i == @bubble.boosts_count
@bubble.boosts_count + 1
else
params[:boost_count].to_i
end
@bubble.boost!(count)
respond_to do |format|
format.turbo_stream
end
end
end