Sha256: 52100d37ad33bb8ae97f22c3d02e7856bea3e1a47790b5ef57604117c66ede1d

Contents?: true

Size: 541 Bytes

Versions: 16

Compression:

Stored size: 541 Bytes

Contents

require 'addressable/uri'

# It acts as a guide container in monolesson contexts
class ChaptersController < GuideContainerController
  include Mumuki::Laboratory::Controllers::ImmersiveNavigation
  include Mumuki::Laboratory::Controllers::ValidateAccessMode

  def subject
    @chapter ||= Chapter.find_by(id: params[:id])
  end

  private

  def set_guide
    @monolesson = subject.monolesson
    @guide = @monolesson&.guide
  end

  def authorization_minimum_role
    :ex_student
  end

  def subject_container
    subject.topic
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.22.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.21.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.20.1 app/controllers/chapters_controller.rb
mumuki-laboratory-9.20.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.19.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.18.1 app/controllers/chapters_controller.rb
mumuki-laboratory-9.18.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.17.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.16.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.15.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.14.1 app/controllers/chapters_controller.rb
mumuki-laboratory-9.14.0 app/controllers/chapters_controller.rb
mumuki-laboratory-9.13.2 app/controllers/chapters_controller.rb
mumuki-laboratory-9.13.1 app/controllers/chapters_controller.rb
mumuki-laboratory-9.13.0 app/controllers/chapters_controller.rb