From 0c1cd15470b6f953e1af8f47d072270b55474c31 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Sat, 24 Jul 2010 17:43:50 +0200 Subject: to_param shoul return a string --- actionpack/test/lib/controller/fake_models.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index bf3e175f1f..37b200d57a 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -83,7 +83,7 @@ class Comment def to_key; id ? [id] : nil end def save; @id = 1; @post_id = 1 end def persisted?; @id.present? end - def to_param; @id; end + def to_param; @id.to_s; end def name @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" end -- cgit v1.2.3