Sha256: 55e10c63283c292252d679066d24655c3b4fe74e84e90c708dbd470a92c296e8

Contents?: true

Size: 893 Bytes

Versions: 14

Compression:

Stored size: 893 Bytes

Contents

module Effective
  class CpdAuditReviewsController < ApplicationController
    before_action(:authenticate_user!) if defined?(Devise)

    include Effective::WizardController

    resource_scope do
      EffectiveCpd.CpdAuditReview.deep.where(user: current_user)
    end

    page_title 'Chat', only: [:chat]

    # Reuse the same view for all cpd_audit_level_section steps
    # https://github.com/zombocom/wicked/blob/v1.3.4/lib/wicked/controller/concerns/render_redirect.rb#L32
    def render_step(the_step, options = {}, params = {})
      if resource.dynamic_wizard_statement_steps.keys.include?(the_step)
        render('effective/cpd_audit_reviews/cpd_statement', options)
      elsif resource.dynamic_wizard_questionnaire_steps.keys.include?(the_step)
        render('effective/cpd_audit_reviews/cpd_audit_level_section', options)
      else
        super
      end
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
effective_cpd-1.3.5 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.3.4 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.3.3 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.3.2 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.3.1 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.3.0 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.2.4 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.2.3 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.2.2 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.2.1 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.2.0 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.1.3 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.1.2 app/controllers/effective/cpd_audit_reviews_controller.rb
effective_cpd-1.1.1 app/controllers/effective/cpd_audit_reviews_controller.rb