Files
fizzy/app/controllers/boosts_controller.rb
T
2024-12-13 16:54:11 -06:00

17 lines
341 B
Ruby

class BoostsController < ApplicationController
include BubbleScoped, BucketScoped
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