mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
to_param shoul return a string
This commit is contained in:
parent
4cd6f77526
commit
0c1cd15470
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue