Sha256: 345eba5509f84ecec1557d5af11a14744ecc161790256a8ab94b96ff12ada25e
Contents?: true
Size: 805 Bytes
Versions: 13
Compression:
Stored size: 805 Bytes
Contents
# frozen_string_literal: true require_dependency "think_feel_do_engine/application_controller" module ThinkFeelDoEngine module Participants # Read Lesson content. class LessonsController < ApplicationController before_action :authenticate_participant! rescue_from ActiveRecord::RecordNotFound, with: :record_not_found layout "tool" def show @lesson = ContentModules::LessonModule.find(params[:id]) end private def record_not_found arm = current_participant.active_membership.group.arm learn_tool = arm.bit_core_tools.find_by_type("Tools::Learn") redirect_to( navigator_context_url(arm_id: arm.id, context_name: learn_tool.title), alert: "Lesson not found" ) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems