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