Sha256: b1cc1009b2612645915a994a0b59baa88b5dd05edb6534e8070a27695cb601e9

Contents?: true

Size: 839 Bytes

Versions: 1

Compression:

Stored size: 839 Bytes

Contents

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 text: '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

1 entries across 1 versions & 1 rubygems

Version Path
calagator-1.1.0 app/controllers/calagator/site_controller.rb