Permalink
Browse files

to_param shoul return a string

  • Loading branch information...
1 parent 4cd6f77 commit 0c1cd15470b6f953e1af8f47d072270b55474c31 @drogus drogus committed Jul 24, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/test/lib/controller/fake_models.rb
@@ -83,7 +83,7 @@ def initialize(id = nil, post_id = nil); @id, @post_id = id, post_id end
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

0 comments on commit 0c1cd15

Please sign in to comment.