Closed misch closed 11 years ago
"Method by_id takes a string. Ouch!
by_id
def self.by_id id @@comments[id.to_i] end
Then in the test you use Comment.by_id("#{comment.id}")instead of Comment.by_id( comment.id ). Ugly."
Comment.by_id("#{comment.id}")
Comment.by_id( comment.id )
"Method
by_id
takes a string. Ouch!def self.by_id id @@comments[id.to_i] end
Then in the test you use
Comment.by_id("#{comment.id}")
instead ofComment.by_id( comment.id )
. Ugly."