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 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
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):
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.
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.