This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
dsutedja (author)
Tue Aug 05 07:48:19 -0700 2008
mack-more / mack-distributed / spec / fake_application / app / controllers / vtt / view_template_controller.rb
| dc169592 » | dsutedja | 2008-08-05 | 1 | class Vtt::ViewTemplateController | |
| 2 | include Mack::Controller | ||||
| 3 | |||||
| 4 | def bart_html_erb_with_layout | ||||
| 5 | render(:action, "bart") | ||||
| 6 | end | ||||
| 7 | |||||
| 8 | def bart_html_erb_with_special_layout | ||||
| 9 | render(:action, "bart", :layout => "my_cool") | ||||
| 10 | end | ||||
| 11 | |||||
| 12 | def bart_html_erb_without_layout | ||||
| 13 | render(:action, "bart", :layout => false) | ||||
| 14 | end | ||||
| 15 | |||||
| 16 | def lisa_inline_erb_with_layout | ||||
| 17 | render(:inline, %{Lisa <%= "Simpson" %>: INLINE, ERB}) | ||||
| 18 | end | ||||
| 19 | |||||
| 20 | def lisa_inline_erb_with_special_layout | ||||
| 21 | render(:inline, %{Lisa <%= "Simpson" %>: INLINE, ERB}, :layout => "my_cool") | ||||
| 22 | end | ||||
| 23 | |||||
| 24 | def lisa_inline_erb_without_layout | ||||
| 25 | render(:inline, %{Lisa <%= "Simpson" %>: INLINE, ERB}, :layout => false) | ||||
| 26 | end | ||||
| 27 | |||||
| 28 | def homer_xml_with_layout | ||||
| 29 | render(:xml, "homer") | ||||
| 30 | @name = "Homer Simpson" | ||||
| 31 | end | ||||
| 32 | |||||
| 33 | def homer_xml_without_layout | ||||
| 34 | @name = "Homer Simpson" | ||||
| 35 | render(:xml, "homer", :layout => false) | ||||
| 36 | end | ||||
| 37 | |||||
| 38 | def homer_xml_with_special_layout | ||||
| 39 | @name = "Homer Simpson" | ||||
| 40 | render(:xml, "homer", :layout => "my_cool") | ||||
| 41 | end | ||||
| 42 | |||||
| 43 | def good_get_url | ||||
| 44 | render(:url, "http://testing.mackframework.com/render_url_get_test.php", :parameters => {:age => 31}) | ||||
| 45 | end | ||||
| 46 | |||||
| 47 | def bad_get_url | ||||
| 48 | render(:url, "http://testing.mackframework.com/i_dont_exist.html", :parameters => {:age => 31}) | ||||
| 49 | end | ||||
| 50 | |||||
| 51 | def bad_with_raise_url | ||||
| 52 | render(:url, "http://testing.mackframework.com/i_dont_exist.html", :raise_exception => true, :parameters => {:age => 31}) | ||||
| 53 | end | ||||
| 54 | |||||
| 55 | def good_post_url | ||||
| 56 | render(:url, "http://testing.mackframework.com/render_url_post_test.php", :method => :post, :parameters => {:age => 31}) | ||||
| 57 | end | ||||
| 58 | |||||
| 59 | def bad_post_url | ||||
| 60 | render(:url, "http://testing.mackframework.com/i_dont_exist.php", :method => :post, :parameters => {:age => 31}) | ||||
| 61 | end | ||||
| 62 | |||||
| 63 | def bad_post_with_raise_url | ||||
| 64 | render(:url, "http://testing.mackframework.com/i_dont_exist.php", :raise_exception => true, :method => :post, :parameters => {:age => 31}) | ||||
| 65 | end | ||||
| 66 | |||||
| 67 | def good_put_url | ||||
| 68 | render(:url, "http://testing.mackframework.com/render_url_post_test.php", :method => :put, :parameters => {:age => 31}) | ||||
| 69 | end | ||||
| 70 | |||||
| 71 | def good_delete_url | ||||
| 72 | render(:url, "http://testing.mackframework.com/render_url_post_test.php", :method => :delete, :parameters => {:age => 31}) | ||||
| 73 | end | ||||
| 74 | |||||
| 75 | def say_hi | ||||
| 76 | render(:text, "Hello", :layout => false) | ||||
| 77 | end | ||||
| 78 | |||||
| 79 | def public_found | ||||
| 80 | render(:public, "vtt_public_test") | ||||
| 81 | end | ||||
| 82 | |||||
| 83 | def public_not_found | ||||
| 84 | render(:public, "vtt_public_not_found_test") | ||||
| 85 | end | ||||
| 86 | |||||
| 87 | def public_found_nested | ||||
| 88 | render(:public, "vtt/vtt_public_nested_test") | ||||
| 89 | end | ||||
| 90 | |||||
| 91 | def public_with_extension | ||||
| 92 | render(:public, 'vtt/vtt_public_with_extension_test.txt') | ||||
| 93 | end | ||||
| 94 | |||||
| 95 | def partial_local | ||||
| 96 | render(:partial, :local_part) | ||||
| 97 | end | ||||
| 98 | |||||
| 99 | def partial_outside | ||||
| 100 | render(:partial, "application/outside_part") | ||||
| 101 | end | ||||
| 102 | |||||
| 103 | end | ||||







