Sha256: c2e68125155d560a2f8ca63f95f4109baca6263ca39a0e03409a8ebfae6b1b6c

Contents?: true

Size: 801 Bytes

Versions: 8

Compression:

Stored size: 801 Bytes

Contents

# Default url mappings are:
# 
# * a controller called Main is mapped on the root of the site: /
# * a controller called Something is mapped on: /something
# 
# If you want to override this, add a line like this inside the class:
#
#  map '/otherurl'
#
# this will force the controller to be mounted on: /otherurl.
class MainController < Controller
  # the index action is called automatically when no other action is specified
  def index
    @title = 'Welcome to Ramaze!'
  end

  # the string returned at the end of the function is used as the html body
  # if there is no template for the action. if there is a template, the string
  # is silently ignored
  def notemplate
    @title = 'Welcome to Ramaze!'
    
    return 'There is no \'notemplate.xhtml\' associated with this action.'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ramaze-2023.01.06 lib/proto/controller/main.rb
ramaze-2012.12.08 lib/proto/controller/main.rb
ramaze-2012.12.08b lib/proto/controller/main.rb
ramaze-2012.04.14 lib/proto/controller/main.rb
ramaze-2012.03.07 lib/proto/controller/main.rb
ramaze-2011.12.28 lib/proto/controller/main.rb
ramaze-2011.10.23 lib/proto/controller/main.rb
ramaze-2011.07.25 lib/proto/controller/main.rb