Sha256: 63a041b8bcf5e949c447bbf7437e73e374ed62606297bace46e03cbbc91bb27b

Contents?: true

Size: 416 Bytes

Versions: 20

Compression:

Stored size: 416 Bytes

Contents

class GuideContainerController < ApplicationController

  before_action :set_guide

  def show
    if current_user?
      @stats = subject.stats_for(current_user)
      @next_exercise = subject.next_exercise(current_user)
    else
      @next_exercise = subject.first_exercise
    end
  end

  private

  def set_guide
    raise Mumuki::Laboratory::NotFoundError if subject.nil?
    @guide = subject.guide
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mumuki-laboratory-5.5.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.4.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.3.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.2.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.2.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.1.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.1.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.12 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.11 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.10 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.9 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.8 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.7 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.6 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.5 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.4 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.3 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.2 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.0.0 app/controllers/guide_container_controller.rb