On 24 August 2015 at 10:59, Milley Duke <lists@ruby-forum.com> wrote:
> Hi,
>
> Is there any way that I can Update column value of another table when
> saving form data of another model.
>
> For example:
>
> I have two models model A and model B. Both of them have one to many
> relation with each other.
>
> On filling data in form fields of model B , when particular condition
> met, i want to update the column value of model A.
As I explained when you first asked this problem you can write to
records in any table you like in any controller. Simple find the
record you want, update the value and save it. I note you did not
reply to the help offered by Elizabeth or myself in that case.
Also, as Elizabeth suggested, I think perhaps you have missed some of
the basic concepts of Rails and suggest that working right through a
good tutorial such as railstutorial.org (which is free to use online)
would help you and save you a lot of time in the long run.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvxqX8yQnipop7SgsH2JpVWt0X3J8iAbhhxzxTFPSHrJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment