#15 new
Chad Arimura

Rest routing without implicit .id does not work

Reported by Chad Arimura | March 5th, 2010 @ 12:52 AM

For example: when generating scaffolding for Rails 2, you'll get lines of code like this that work with ActiveRecord

format.html { redirect_to(@user) }

Simplerecord returns this error: ActionView::TemplateError (user_url failed to generate from.....

When changing the line to

format.html { redirect_to(@user.id) }

It works...... we should fix this to bring SR closer to AR's spec.

Comments and changes to this ticket

  • Chad Arimura

    Chad Arimura March 5th, 2010 @ 12:57 AM

    Actually I take that back redirect_to(@user.id) doesn't work anyways.... it doesn't throw an error per se but it's not supported...

    Adding functionality for that to comply with restful routing is important.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A drop in replacement for ActiveRecord for Amazon SimpleDB.

Code hosted at http://github.com/appoxy/simple_record

Shared Ticket Bins

People watching this ticket