C0 code coverage information
Generated on Sat May 27 21:23:36 CEST 2006 with rcov 0.5.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 Category < ActiveRecord::Base
2 acts_as_list
3 has_and_belongs_to_many :articles, :order => "created_at DESC"
4
5 def self.find_all_with_article_counters
6 self.find_by_sql(%{
7 SELECT id, name, permalink, position, COUNT(article_id) AS article_counter
8 FROM categories LEFT OUTER JOIN articles_categories
9 ON articles_categories.category_id = categories.id
10 GROUP BY categories.id, categories.name, categories.position, categories.permalink
11 ORDER BY name
12 })
13 end
14
15 def stripped_name
This method was called by:
1 app/models/category.rb:24 in 'set_defaults'
16 self.name.to_url
17 end
18
19 protected
20
21 before_save :set_defaults
22
23 def set_defaults
This method was called by:
2 vendor/rails/activerecord/lib/active_record/callbacks.rb:333 in 'callback'
24 self.permalink ||= self.stripped_name
25 end
26
27 validates_presence_of :name
28 validates_uniqueness_of :name, :on => :create
29 end
30
Generated using the rcov code coverage analysis tool for Ruby version 0.5.0.