Sha256: d0d8818f234d8115351b6403e91fbbd5667fcce4bcc2c1cbfb1087d59d3b2f59

Contents?: true

Size: 350 Bytes

Versions: 39

Compression:

Stored size: 350 Bytes

Contents

class GuidesController < ApplicationController
  def show
    redirect_to_usage Guide.find_by!(id: params[:id])
  end

  def show_by_slug
    redirect_to_usage Guide.by_slug_parts!(params)
  end

  def redirect_to_usage(guide)
    raise Mumuki::Laboratory::NotFoundError unless guide.usage_in_organization.try { |usage| redirect_to usage }
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

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