Class: Calagator::SiteController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#recaptcha_enabled?

Instance Method Details

#aboutObject

Displays the about page.



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

def about; end

#defunctObject

Raises:

  • (ArgumentError)


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

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

#helloObject

Render something to help benchmark stack without the views



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

def hello
  render plain: 'hello'
end

#indexObject



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

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)


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

def omfg
  raise ArgumentError, 'OMFG'
end

#opensearchObject



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

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