Files
fizzy/app/controllers/bubbles/watches_controller.rb
T
David Heinemeier Hansson f725a69dee Let BubbleScoped find its own bucket
Then it will be easier to break things that are double nested out of
that nesting.
2025-04-05 15:44:47 +02:00

18 lines
373 B
Ruby

class Bubbles::WatchesController < ApplicationController
include BubbleScoped
def create
set_watching_and_redirect(true)
end
def destroy
set_watching_and_redirect(false)
end
private
def set_watching_and_redirect(watching)
@bubble.set_watching(Current.user, watching)
redirect_to bucket_bubble_watch_path(@bucket, @bubble)
end
end