RESTful routing, in-place editing, and creating new resource obj - design question

I'm working on adding in-place editing of one of my RESTful resources
and I need advice on how to make a change to the design patterns we
all know and love for the creation/editing of a new resource object.

Out of the box, Rails gives you the 'new' and 'create' actions for
creating a new resource object. This is fine for when you want a
separate page for initial creation and subsequent editing of that
resource.

But, now with in-place editing, my edits take place via the 'show'
view with AJAX handling of those in place edts.

So, what's the approach for when the user goes to create a new
resource obj?

I thought I could just redirect from the 'new' action to the 'show'
action after creating the new obj, but with RESTful routing this takes
me to the index view.

Anybody know how to do this?

Or is it best practice to still have a full page edit form for the
initial edit and only go to in-place editing for subsequent edits?

I believe that in this tutorial lie the answers to some if not all of
your questions:
http://www.buildingwebapps.com/learningrails

I followed it a little while back and it clicked a lot of things about
Rails for me, and it does talk about in-place editing among others.
Check it out, it may just be what you're looking for :slight_smile:

Thx, Aldric.... but, could you pt me to the specific page for the
tutorial you mentioned?

lunaclaire wrote:

Thx, Aldric.... but, could you pt me to the specific page for the
tutorial you mentioned?

On Aug 20, 10:01´┐Żam, Aldric Giacomoni <rails-mailing-l...@andreas-

If you're familiar enough with rails to read and understand, you'll want
to at least read lessons 10 and on to understand how they're building
their app (it's pretty quick):

http://www.buildingwebapps.com/podcasts/6663-putting-the-page-contents-into-the/show_notes

Until you get to lesson 14:

http://www.buildingwebapps.com/podcasts/6746-using-textile-markup-plus-in-place-editing/show_notes

for anyone else looking into this...

I guess I didnt find my answers on best practices for this, but I
solved the RESTful routing to my index page by creating a named route
for creating the new resource and going right to its 'show' action/
view.

Also, to solve the initial validation prob, I just stuff it with
valid, dummy data and then let the user edit it.

for anyone else looking into this...

I guess I didnt find my answers on best practices for this, but I
solved the RESTful routing to my index page by creating a named route
for creating the new resource and going right to its 'show' action/
view.

Also, to solve the initial validation prob, I just stuff it with
valid, dummy data and then let the user edit it.