Sha256: a06c2e28a6460630cfabc460e50c330fd7d1402448098e67b0ad2572dab22649
Contents?: true
Size: 961 Bytes
Versions: 37
Compression:
Stored size: 961 Bytes
Contents
require 'rubygems' require 'ramaze' class MainController < Ramaze::Controller engine :Haml def index %{#{a('Home',:/)} | #{a(:internal)} | #{a(:external)}} end def internal *args @args = args @place = :internal @title = "The #@place Template for Haml" %q{ %html %head %title= "Template::Haml #@place" %body %h1= @title = a('Home',:/) %p Here you can pass some stuff if you like, parameters are just passed like this: %br/ = a("#@place/one") %br/ = a("#@place/one/two/three") %br/ = a("#@place/one?foo=bar") %div The arguments you have passed to this action are: - if @args.empty? none - else - @args.each do |arg| %span= arg %div= request.params.inspect } end def external *args @args = args @place = :external @title = "The #@place Template for Haml" end end Ramaze.start :file => __FILE__
Version data entries
37 entries across 37 versions & 4 rubygems