C0 code coverage information
Generated on Sun Jun 11 23:15:12 CEST 2006 with rcov 0.6.0
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 module Admin::BaseHelper
2
3 def render_flash
4 output = []
5
6 for key,value in @flash
7 output << "<span class=\"#{key.downcase}\">#{value}</span>"
8 end if @flash
9
10 output.join("<br/>\n")
11 end
12
13 def render_tasks
14 output = []
15
16 for key,value in @tasks
17 output << "<a href=\"#{value}\">#{key}</a>"
18 end if @tasks
19
20 output.join("<br/>\n")
21 end
22
23 def current_user_notice
Called by
33 app/views/layouts/administration.rhtml:20 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
24 unless session[:user]
25 link_to "log in", :controller => "/accounts", :action=>"login"
26 else
27 link_to "log out", :controller => "/accounts", :action=>"logout"
Calls
33 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
28 end
29 end
30
31 def tab(label, options = {})
Called by
33 app/views/layouts/administration.rhtml:31 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:32 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:33 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:36 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:34 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:37 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
33 app/views/layouts/administration.rhtml:35 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
32 if controller.controller_name =~ /#{options[:controller].split('/').last}/
Calls
231 ActionController::Base#controller_name at vendor/rails/actionpack/lib/action_controller/base.rb:458
33 content_tag :li, link_to(label, options, {"class"=> "active"}), {"class"=> "active"}
Calls
20 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
20 ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21
34 else
35 content_tag :li, link_to(label, options)
Calls
211 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
211 ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21
36 end
37 end
38
39 def cancel(url = {:action => 'list'})
Called by
2 app/views/admin/content/new.rhtml:16 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_new'
2 app/views/admin/content/edit.rhtml:19 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_edit'
1 app/views/admin/trackback/new.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_new'
1 app/views/admin/comments/edit.rhtml:15 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_edit'
1 app/views/admin/categories/edit.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_edit'
1 app/views/admin/comments/new.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_new'
1 app/views/admin/blacklist/edit.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist_edit'
1 app/views/admin/trackback/edit.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_edit'
40 link_to "Cancel", url
Calls
10 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
41 end
42
43 def save(val = "Store")
Called by
2 app/views/admin/content/new.rhtml:16 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_new'
2 app/views/admin/categories/_quick_post.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories__quick_post'
2 app/views/admin/content/_quick_post.rhtml:18 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__quick_post'
2 app/views/admin/content/edit.rhtml:19 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_edit'
2 app/views/admin/blacklist/_quick_post.rhtml:14 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist__quick_post'
1 app/views/admin/comments/new.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_new'
1 app/views/admin/categories/edit.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_edit'
1 app/views/admin/trackback/new.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_new'
1 app/views/admin/blacklist/edit.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist_edit'
1 app/views/admin/general/index.rhtml:111 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/comments/edit.rhtml:15 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_edit'
1 app/views/admin/general/index.rhtml:75 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:97 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/trackback/edit.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_edit'
1 app/views/admin/general/index.rhtml:56 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
44 '<input type="submit" value="' + val + '" class="primary" />'
45 end
46
47 def confirm_delete(val = "Delete")
Called by
1 app/views/admin/comments/destroy.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_destroy'
1 app/views/admin/blacklist/destroy.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist_destroy'
1 app/views/admin/trackback/destroy.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_destroy'
1 app/views/admin/content/destroy.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_destroy'
1 app/views/admin/categories/destroy.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_destroy'
48 '<input type="submit" value="' + val + '" />'
49 end
50
51 def link_to_show(record)
52 link_to image_tag('go'), :action => 'show', :id => record.id
53 end
54
55 def link_to_edit(record)
Called by
8 app/views/admin/content/_articles.rhtml:16 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
4 app/views/admin/blacklist/_blacklist_patterns.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist__blacklist_patterns'
2 app/views/admin/comments/list.rhtml:24 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_list'
2 app/views/admin/trackback/list.rhtml:26 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_list'
56 link_to image_tag('go'), :action => 'edit', :id => record.id
Calls
16 ActionView::Helpers::AssetTagHelper#image_tag at vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb:133
16 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
8 Article#id at (eval):1
4 BlacklistPattern#id at (eval):1
2 Comment#id at (eval):1
2 Trackback#id at (eval):1
57 end
58
59 def link_to_destroy(record)
Called by
8 app/views/admin/content/_articles.rhtml:17 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
6 app/views/admin/categories/_categories.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories__categories'
4 app/views/admin/blacklist/_blacklist_patterns.rhtml:13 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist__blacklist_patterns'
2 app/views/admin/trackback/list.rhtml:27 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_list'
2 app/views/admin/comments/list.rhtml:25 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_list'
60 link_to image_tag('delete'), :action => 'destroy', :id => record.id
Calls
22 ActionView::Helpers::AssetTagHelper#image_tag at vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb:133
22 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
8 Article#id at (eval):1
6 Category#id at (eval):1
4 BlacklistPattern#id at (eval):1
2 Comment#id at (eval):1
2 Trackback#id at (eval):1
61 end
62
63 def text_filter_options
Called by
4 app/views/admin/content/_form.rhtml:35 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__form'
1 app/views/admin/general/index.rhtml:71 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:65 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
64 text_filter_options = Array.new
65 text_filter_options << [ 'None', 'none' ]
66 text_filter_options << [ 'Textile', 'textile' ] if defined?(RedCloth)
67 text_filter_options << [ 'Markdown', 'markdown' ] if defined?(BlueCloth)
68 text_filter_options << [ 'SmartyPants', 'smartypants' ] if defined?(RubyPants)
69 text_filter_options << [ 'Markdown with SmartyPants', 'markdown smartypants' ] if defined?(RubyPants) and defined?(BlueCloth)
70 text_filter_options
71 end
72
73 def alternate_class
Called by
8 app/views/admin/content/_articles.rhtml:11 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
6 app/views/admin/categories/_categories.rhtml:8 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories__categories'
4 app/views/admin/blacklist/_blacklist_patterns.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist__blacklist_patterns'
74 @class = @class != '' ? '' : 'class="shade"'
75 end
76
77 def task_quickpost(title)
Called by
2 app/views/admin/blacklist/list.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist_list'
2 app/views/admin/categories/list.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_list'
2 app/views/admin/content/list.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_list'
78 content_tag :li, link_to_function(title, toggle_effect('quick-post', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4"))
Calls
6 ApplicationHelper#toggle_effect at app/helpers/application_helper.rb:144
6 ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21
6 ActionView::Helpers::JavaScriptHelper#link_to_function at vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb:42
79 end
80
81 def task_quicknav(title)
Called by
2 app/views/admin/content/list.rhtml:6 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_list'
82 content_tag :li, link_to_function(title, toggle_effect('quick-navigate', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4"))
Calls
2 ApplicationHelper#toggle_effect at app/helpers/application_helper.rb:144
2 ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21
2 ActionView::Helpers::JavaScriptHelper#link_to_function at vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb:42
83 end
84
85 def task_overview
Called by
19 app/views/layouts/administration.rhtml:58 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
86 task('Back to overview', 'list')
Calls
19 Controllers::Admin::BaseHelper#task at app/helpers/admin/base_helper.rb:105
87 end
88
89 def task_new(title)
Called by
2 app/views/admin/users/list.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_users_list'
2 app/views/admin/content/list.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_list'
2 app/views/admin/comments/list.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_list'
2 app/views/admin/content/edit.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_edit'
2 app/views/admin/trackback/list.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_list'
90 task(title, 'new')
Calls
10 Controllers::Admin::BaseHelper#task at app/helpers/admin/base_helper.rb:105
91 end
92
93 def task_destroy(title, id)
94 task(title, 'destroy', id)
95 end
96
97 def task_edit(title, id)
Called by
1 app/views/admin/categories/show.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_show'
1 app/views/admin/trackback/show.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_show'
1 app/views/admin/content/show.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_show'
98 task(title, 'edit', id)
Calls
3 Controllers::Admin::BaseHelper#task at app/helpers/admin/base_helper.rb:105
99 end
100
101 def task_show(title, id)
Called by
1 app/views/admin/content/destroy.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_destroy'
1 app/views/admin/comments/destroy.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_destroy'
1 app/views/admin/categories/destroy.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories_destroy'
1 app/views/admin/blacklist/destroy.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_blacklist_destroy'
102 task(title, 'show', id)
Calls
4 Controllers::Admin::BaseHelper#task at app/helpers/admin/base_helper.rb:105
103 end
104
105 def task(title, action, id = nil)
Called by
19 app/helpers/admin/base_helper.rb:86 in 'Controllers::Admin::BaseHelper#task_overview'
10 app/helpers/admin/base_helper.rb:90 in 'Controllers::Admin::BaseHelper#task_new'
4 app/helpers/admin/base_helper.rb:102 in 'Controllers::Admin::BaseHelper#task_show'
3 app/helpers/admin/base_helper.rb:98 in 'Controllers::Admin::BaseHelper#task_edit'
106 content_tag :li, link_to(title, :action => action, :id => id)
Calls
36 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
36 ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21
107 end
108
109 end
Generated using the rcov code coverage analysis tool for Ruby version 0.6.0.