Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Rest routing without implicit .id does not work

#15

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.

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

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Chad Arimura
    Chad Arimura

    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.

    March 5th, 2010 @ 12:57 AM

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.