Sha256: 593155148e9e66ac1418dfd33fbd555cec2a0b5952e710657753539ea97f2f3b

Contents?: true

Size: 467 Bytes

Versions: 19

Compression:

Stored size: 467 Bytes

Contents

class GuideContainerController < ApplicationController
  include Mumuki::Laboratory::Controllers::Content

  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

19 entries across 19 versions & 1 rubygems

Version Path
mumuki-laboratory-5.13.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.12.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.12.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.11.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.10.4 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.10.3 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.10.2 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.10.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.10.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.9.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.9.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.8.3 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.8.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.8.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.7.0 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.6.3 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.6.2 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.6.1 app/controllers/guide_container_controller.rb
mumuki-laboratory-5.6.0 app/controllers/guide_container_controller.rb