[rspec-users] oddness with messages_path
Cynthia Kiser
cnk at ugcs.caltech.edu
Sun Nov 27 01:15:18 EST 2011
Quoting Justin Ko <jko170 at gmail.com>:
> Run "rake routes" and you'll see what the two "paths" generate.
Rake routes didn't really give me much insight - but playing around in
the console did. Any argument to messages_path gets interpreted as a
format - even an integer.
> app.messages_path(:pdf)
=> "/messages.pdf"
> app.messages_path("doc")
=> "/messages.doc"
> app.messages_path(1)
=> "/messages.1"
That hadn't occured to me - even once someone pointed out my
singular/plural problem.
--
Cynthia N. Kiser
cnk at ugcs.caltech.edu
More information about the rspec-users
mailing list