diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-24 17:43:50 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:08 +0200 |
commit | 0c1cd15470b6f953e1af8f47d072270b55474c31 (patch) | |
tree | e7e8a1772d3e760b886afa3c6457776f77c26dc4 /actionpack/test/lib | |
parent | 4cd6f7752658f0ec13d082fa2ee2a6f766410645 (diff) | |
download | rails-0c1cd15470b6f953e1af8f47d072270b55474c31.tar.gz rails-0c1cd15470b6f953e1af8f47d072270b55474c31.tar.bz2 rails-0c1cd15470b6f953e1af8f47d072270b55474c31.zip |
to_param shoul return a string
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |