C0 code coverage information
Generated on Mon Dec 08 16:53:35 -0800 2008 with rcov 0.8.1.3
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 VisitTypesController < ApplicationController
2 before_filter :login_required
3 after_filter :store_location, :only => [:index, :show]
4
5 # GET /visit_types
6 # GET /visit_types.xml
7 def index
8 @visit_types = VisitType.find(:all, :order => :visit_type)
9
10 respond_to do |format|
11 format.html # index.html.erb
12 format.xml { render :xml => @visit_types }
13 end
14 end
15
16 # GET /visit_types/1
17 # GET /visit_types/1.xml
18 def show
19 @visit_type = VisitType.find(params[:id])
20
21 respond_to do |format|
22 format.html # show.html.erb
23 format.xml { render :xml => @visit_type }
24 end
25 end
26
27 # GET /visit_types/new
28 # GET /visit_types/new.xml
29 def new
30 @visit_type = VisitType.new
31
32 respond_to do |format|
33 format.html # new.html.erb
34 format.xml { render :xml => @visit_type }
35 end
36 end
37
38 # GET /visit_types/1/edit
39 def edit
40 @visit_type = VisitType.find(params[:id])
41 end
42
43 # POST /visit_types
44 # POST /visit_types.xml
45 def create
46 @visit_type = VisitType.new(params[:visit_type])
47
48 respond_to do |format|
49 if @visit_type.save
50 flash[:notice] = 'Visit type was successfully created.'
51 format.html { redirect_back_or_default('/') }
52 format.xml { render :xml => @visit_type, :status => :created, :location => @visit_type }
53 else
54 format.html { render :action => "new" }
55 format.xml { render :xml => @visit_type.errors, :status => :unprocessable_entity }
56 end
57 end
58 end
59
60 # PUT /visit_types/1
61 # PUT /visit_types/1.xml
62 def update
63 @visit_type = VisitType.find(params[:id])
64
65 respond_to do |format|
66 if @visit_type.update_attributes(params[:visit_type])
67 flash[:notice] = 'Visit type was successfully updated.'
68 format.html { redirect_to(@visit_type) }
69 format.xml { head :ok }
70 else
71 format.html { render :action => "edit" }
72 format.xml { render :xml => @visit_type.errors, :status => :unprocessable_entity }
73 end
74 end
75 end
76
77 # DELETE /visit_types/1
78 # DELETE /visit_types/1.xml
79 def destroy
80 @visit_type = VisitType.find(params[:id])
81 @visit_type.destroy
82
83 respond_to do |format|
84 format.html { redirect_to(visit_types_url) }
85 format.xml { head :ok }
86 end
87 end
88 end
Generated using the rcov code coverage analysis tool for Ruby
version 0.8.1.3.