Files
fizzy/app/controllers/bubbles/watches_controller.rb
T
David Heinemeier Hansson eb0614c44f Use a more ergonomic API for watching
Passing a boolean vs using explicit on/off methods feel too low level
and doesnt read right in most of these cases.
2025-04-06 19:17:26 +02:00

14 lines
313 B
Ruby

class Bubbles::WatchesController < ApplicationController
include BubbleScoped
def create
@bubble.watch_by Current.user
redirect_to bucket_bubble_watch_path(@bucket, @bubble)
end
def destroy
@bubble.unwatch_by Current.user
redirect_to bucket_bubble_watch_path(@bucket, @bubble)
end
end