Class: BucketMakerController

Inherits:
ApplicationController
  • Object
show all
Includes:
BucketMakerConcern
Defined in:
app/controllers/bucket_maker_controller.rb

Instance Method Summary collapse

Instance Method Details

#randomizeObject

Randomize the current_user for series_name and bucket_name



21
22
23
# File 'app/controllers/bucket_maker_controller.rb', line 21

def randomize
  render text: @current_user.bucketize_for_series_and_bucket!(@series_name, @bucket_name)
end

#showObject

Show if the group for the current_user is the same as stored



9
10
11
# File 'app/controllers/bucket_maker_controller.rb', line 9

def show
  render text: @current_user.in_bucket?(@series_name, @bucket_name, @group_name)
end

#switchObject

Switch the current user to group_name



15
16
17
# File 'app/controllers/bucket_maker_controller.rb', line 15

def switch
  render text: @current_user.force_to_bucket!(@series_name, @bucket_name, @group_name)
end