Class: Calagator::SiteController

Inherits:
ApplicationController show all
Defined in:
app/controllers/calagator/site_controller.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject

Displays the about page.



23
# File 'app/controllers/calagator/site_controller.rb', line 23

def about; end

#defunctObject

Raises:

  • (ArgumentError)


31
32
33
34
# File 'app/controllers/calagator/site_controller.rb', line 31

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

#helloObject

Render something to help benchmark stack without the views



10
11
12
# File 'app/controllers/calagator/site_controller.rb', line 10

def hello
  render :text => "hello"
end

#indexObject



14
15
16
17
18
19
20
# File 'app/controllers/calagator/site_controller.rb', line 14

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

#omfgObject

Raise exception, mostly for confirming that exception_notification works

Raises:

  • (ArgumentError)


5
6
7
# File 'app/controllers/calagator/site_controller.rb', line 5

def omfg
  raise ArgumentError, "OMFG"
end

#opensearchObject



25
26
27
28
29
# File 'app/controllers/calagator/site_controller.rb', line 25

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