Module: Web::SimpleDispatcher::TemplateClassMixin
- Included in:
- Template, Wiki::PageEditor
- Defined in:
- lib/web/simpledispatcher.rb
Instance Method Summary collapse
- #format_description ⇒ Object
- #handle(aTemplate) ⇒ Object
- #redirect_to(params) ⇒ Object
- #template ⇒ Object
- #template_filename ⇒ Object
- #was_not_a_submit ⇒ Object
Instance Method Details
#format_description ⇒ Object
87 88 89 |
# File 'lib/web/simpledispatcher.rb', line 87 def format_description "Template: #{template_filename}, formclass #{name}" end |
#handle(aTemplate) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/web/simpledispatcher.rb', line 95 def handle aTemplate if was_not_a_submit # trace_dispatcher format_description else # trace_dispatcher "Submit to: #{name}" aTemplate.assign_params aTemplate.on_submit({}) end Web.print_template template_filename, aTemplate, Web.encode_objects(Web.query) end |
#redirect_to(params) ⇒ Object
78 79 80 81 |
# File 'lib/web/simpledispatcher.rb', line 78 def redirect_to params Web.reset_headers Web.set_redirect File.join(Web.script_name, "#{template}?#{Web.make_query_string(Web.encode_objects(params))}") end |
#template ⇒ Object
74 75 76 |
# File 'lib/web/simpledispatcher.rb', line 74 def template SimpleDispatcher::template_from_class self end |
#template_filename ⇒ Object
83 84 85 |
# File 'lib/web/simpledispatcher.rb', line 83 def template_filename template + ".html" end |