examples/templates/template_amrita2.rb in ramaze-0.1.0 vs examples/templates/template_amrita2.rb in ramaze-0.1.1

- old
+ new

@@ -4,37 +4,37 @@ require 'ramaze' include Ramaze # TODO: -# implement the amrita2 example, man, this engine is awkward :P +# - implement the amrita2 example, man, this engine is awkward :P class MainController < Controller - trait :template_root => File.expand_path((File.dirname(__FILE__)/'template')) + template_root File.expand_path((File.dirname(__FILE__)/'template')) trait :engine => Template::Amrita2 def index - %{ #{Rs()} | #{Rs(:internal)} | #{Rs(:external)} } + %{ #{A(Rs())} | #{Rs(:internal)} | #{Rs(:external)} } end def title - "The #@action Template for Amrita2" + "The external Template for Amrita2" end def link_home - link :/, :title => 'Home' + A('Home', :href => '/') end def link_one - link self, @action, :one, :title => "#@action/one" + A('/external/one', :href => Rs(:external, :one)) end def link_two - link self, @action, :one, :two, :three, :title => "#@action/one/two/three" + A("/external/one/two/three", :href => Rs(:external, :one, :two, :three)) end def link_three - link self, @action, :one, :foo => :bar, :title => "#@action?foo=bar" + A("/external?foo=bar", :href => Rs(:external, :one, :foo => :bar)) end def inspect_parameters request.params.inspect end