Sha256: f644f32f00528774332dcccf36e86d306455a316454f98d2a9d1802b02dddac4

Contents?: true

Size: 1009 Bytes

Versions: 10

Compression:

Stored size: 1009 Bytes

Contents

require 'rubygems'
require 'ramaze'

class MainController < Ramaze::Controller
  view_root __DIR__(:template)

  def index
    %{ #{A 'Home', :href => :/} | #{A(:internal)} | #{A(:external)} }
  end

  def internal *args
    @args = args
    %q{
<html>
  <head>
    <title>Template::Ezamar internal</title>
  </head>
  <body>
  <h1>The internal Template for Ezamar</h1>
    #{A 'Home', :href => :/}
    <p>
      Here you can pass some stuff if you like, parameters are just passed like this:<br />
      #{A("internal/one")}<br />
      #{A("internal/one/two/three")}<br />
      #{A("internal/one?foo=bar")}<br />
    </p>
    <div>
      The arguments you have passed to this action are:
      <?r if @args.empty? ?>
        none
      <?r else ?>
        <?r @args.each do |arg| ?>
          <span>#{arg}</span>
        <?r end ?>
      <?r end ?>
    </div>
    <div>
      #{request.params.inspect}
    </div>
  </body>
</html>
    }
  end

  def external *args
    @args = args
  end
end

Ramaze.start

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.12 examples/templates/template_ezamar.rb
Pistos-ramaze-2009.01 examples/templates/template_ezamar.rb
Pistos-ramaze-2009.02 examples/templates/template_ezamar.rb
manveru-ramaze-2008.12 examples/templates/template_ezamar.rb
manveru-ramaze-2009.01 examples/templates/template_ezamar.rb
ptomato-ramaze-2009.02.1 examples/templates/template_ezamar.rb
ptomato-ramaze-2009.02 examples/templates/template_ezamar.rb
ramaze-2009.01 examples/templates/template_ezamar.rb
ramaze-2009.03 examples/templates/template_ezamar.rb
ramaze-2009.02 examples/templates/template_ezamar.rb