Class: BucketMakerController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- BucketMakerController
- Includes:
- BucketMakerConcern
- Defined in:
- app/controllers/bucket_maker_controller.rb
Instance Method Summary collapse
-
#randomize ⇒ Object
Randomize the current_user for series_name and bucket_name.
-
#show ⇒ Object
Show if the group for the current_user is the same as stored.
-
#switch ⇒ Object
Switch the current user to group_name.
Instance Method Details
#randomize ⇒ Object
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 |
#show ⇒ Object
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 |
#switch ⇒ Object
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 |