C0 code coverage information
Generated on Fri Aug 25 10:11:41 PDT 2006 with rcov 0.7.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 class ListsController < ApplicationController
2 layout 'staff'
3
4 before_filter :check_editor_role
5
6 cache_sweeper :article_sweeper, :only => [:add_article, :remove_article]
7
8 def index
9 render :action => 'list'
10 end
11
12 def get_list
13 @list = List.find(params[:id] )
14 render :layout => false
15 end
16
17 def search
18 @list = List.find(params[:list_id])
19 @search_criteria = params[:search_criteria]
20 @article_pages, @articles = paginate(
21 :article,
22 :per_page => 20,
23 :conditions => ["type = :type AND approved = 1 AND
24 (title LIKE N:criteria OR subtitle LIKE N:criteria
25 OR artist LIKE N:criteria
26 OR bside_artist LIKE N:criteria OR bside_title LIKE N:criteria
27 OR record_label LIKE N:criteria) #{ (" AND " << @list.parameter) if @list.parameter }",
28 { :criteria => "%" << @search_criteria << "%",
29 :type => @list.article_type }])
30
31 render :layout => false
32 end
33
34 def add_article
35 @list = List.find(params[:id])
36
37 article = Article.find(params[:article_id])
38 @list.articles.push(article)
39
40 render :partial => 'list_items', :layout => false
41 end
42
43 def remove_article
44 @list = List.find(params[:id])
45
46 article = Article.find(params[:article_id])
47 @list.articles.delete(article)
48
49 render :partial => 'list_items', :layout => false
50 end
51 end
Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.