It sounds like the solution you are looking for is going to require
parsing some JSON, and then handling the update through something like
jQuery.

I'm still trying to wrap my head around AJAX interacting with Rails in
such a way. Before you'd just use RJS, and Prototype would handle the
request, but RJS is so outdated these days.

Maybe you could look up some techniques on updating a record with AJAX
through JSON.

I hope this at least gets you in the right direction... :)

On Apr 17, 10:55 am, Juan Kinunt <li...@ruby-forum.com> wrote:
> Hi!,
>
> I know that Rails do not save in cascade so I need to solve this
> problem:
> I have invoice that has lines. Invoice have fields that are calculated
> with values of lines so when a line is modified or deleted I need to
> update the invoice, how I do that automaticaly? If I use before_save on
> invoice it does nothing because it does not detect that a line related
> is modified. Is the best solution to use a after_save on line that
> updates the invoice?
> --
> Posted viahttp://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to