On Nov 26, 2011, at 8:03 PM, Cynthia Kiser wrote:

> Quoting Patrick J. Collins <patr...@collinatorstudios.com>:
>>> I can work around it by constructing the url myself with
>>> "/messages/#{message.id}" but I am curious where the period is coming
>>> from in the constructed url. 
>> 
>> It's because you should be using a singular resource name to signify that you
>> are updating an existing record.  I believe you want to do
>> "message_path(message)" instead of "messages_path(message)"
> 
> D'ho! Exactly right. I am still mystified by the way in which this
> fails but the problem is indeed that I needed to use
> message_path. That works with (message) and with (message.id). 

Run "rake routes" and you'll see what the two "paths" generate.

> 
> And this is Rails 3.1.3 and rspec 2.7.0, rspec-core 2.7.1, and
> rspec-rails 2.7.0. 
> -- 
> Cynthia N. Kiser
> c...@ugcs.caltech.edu
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to