I thought about doing the same thing. The problem with that is if the user
walks away and the session dies. My solution was to create the records
immediately (on the "new" action) , put the id in the session, and
then
always use that as a reference to update the DB. When all is said and done,
and they click "Submit", THEN I associate the record(s) with the user.
Hope that helps.
- Matt
On 1/30/06, Phil Craven <pjcraven@mail.com> wrote:>
> While working on a new application, a friend and I ran into what we
> think is a problem with using ajax. Users are used to being able to
> modify the contents of a screen until they are finished and then saving
> (committing). There does not seem to be a way to do this with ajax,
> since you have to modify the model whenever you call back to the server.
> The half baked solution that we came up with is to create a copy of the
> child collections and the parent in the session, and modify them. Once
> the user submits, everything is then taken from the session and
> committed. Is there a better way to allow for this kind of functionality
> and use ajax?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Matt Secoske
http://www.secosoft.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060202/a2558a58/attachment-0001.html