Files
fizzy/app/controllers/concerns/bubble_scoped.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

17 lines
295 B
Ruby

module BubbleScoped
extend ActiveSupport::Concern
included do
before_action :set_bubble, :set_bucket
end
private
def set_bubble
@bubble = Bubble.find(params[:bubble_id])
end
def set_bucket
@bucket = Current.user.buckets.find(@bubble.bucket_id)
end
end