Sha256: 0e8ff4fe7bf661aa46625a188a35856024270026d922be09cbb966564beb25c4

Contents?: true

Size: 874 Bytes

Versions: 7

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

module Calagator
  class SiteController < Calagator::ApplicationController
    # Raise exception, mostly for confirming that exception_notification works
    def omfg
      raise ArgumentError, "OMFG"
    end

    # Render something to help benchmark stack without the views
    def hello
      render plain: "hello"
    end

    def index
      @overview = Event::Overview.new
      respond_to do |format|
        format.html {}
        format.any { redirect_to events_path(format: params[:format]) }
      end
    end

    # Displays the about page.
    def about
    end

    def opensearch
      respond_to do |format|
        format.xml { render content_type: "application/opensearchdescription+xml" }
      end
    end

    def defunct
      @url = params[:url]
      raise ArgumentError if /^javascript:/.match?(@url)
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
koalagator-4.1.0 app/controllers/calagator/site_controller.rb
koalagator-4.0.0 app/controllers/calagator/site_controller.rb
koalagator-3.0.0 app/controllers/calagator/site_controller.rb
koalagator-2.1.1 app/controllers/calagator/site_controller.rb
koalagator-2.1.0 app/controllers/calagator/site_controller.rb
calagator2-2.1.1 app/controllers/calagator/site_controller.rb
calagator2-2.1.0 app/controllers/calagator/site_controller.rb