Class: ExercisesController

Inherits:
ApplicationController show all
Includes:
Mumuki::Laboratory::Controllers::Content, Mumuki::Laboratory::Controllers::ExerciseSeed
Defined in:
app/controllers/exercises_controller.rb

Instance Method Summary collapse

Methods included from Mumuki::Laboratory::Controllers::ExerciseSeed

#set_seed!

Methods included from Mumuki::Laboratory::Controllers::Content

#validate_used_here!

Methods inherited from ApplicationController

#login_button, #redirect_to_main_organization!, #should_choose_organization?, #should_redirect_to_main_organization?, #validate_accessible!

Methods included from Mumuki::Laboratory::Controllers::DynamicErrors

#forbidden, #gone, #internal_server_error, #not_found, #unauthorized

Methods included from Mumuki::Laboratory::Controllers::Notifications

#has_notifications?, #notifications_count, #user_notifications_path

Methods included from Mumuki::Laboratory::Controllers::Authorization

#authorization_slug, #authorize_if_private!, #from_sessions?

Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization

#organization_name, #set_current_organization!, #visit_organization!

Instance Method Details

#showObject



11
12
13
# File 'app/controllers/exercises_controller.rb', line 11

def show
  @solution = @exercise.new_solution if current_user?
end

#show_by_slugObject



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

def show_by_slug
  redirect_to Guide.by_slug_parts!(params).exercises.find_by!(bibliotheca_id: params[:bibliotheca_id])
end