OK, I have posted the code to a repo at https://github.com/kenatsun/ww2.  A 
bit of explanation on this:  In this version, there are two "Offer" 
classes, one named *Offer* and the other named *BadOffer*:

   - *Offer *was generated using all the steps in my original post, up to 
   the point where I renamed the foreign key column.  I include this to let 
   you confirm that at that point everything works OK.
   - *BadOffer *was generated in the same way, but I then went on to rename 
   the foreign key, and then did all the attempted fixes described above.
   
~ Ken

On Sunday, January 21, 2018 at 3:26:28 PM UTC-5, kenatsun wrote:
>
> Hassan, that's an excellent idea! 
>
> Where would you suggest I post this repo to make it most easily accessible 
> to you and others?  I could post the code onto GitHub, or... ?  Or is there 
> some other place where Rails developers like to share their work?  (I ask 
> that as a Rails newbie.)
>
> ~ Ken
>
>
> On Sunday, January 21, 2018 at 2:52:10 PM UTC-5, Hassan Schroeder wrote:
>>
>> On Sat, Jan 20, 2018 at 6:51 PM, kenatsun <kena...@gmail.com> wrote: 
>>
>> > The perplexing news is that it remains impossible to create or update 
>> an 
>> > Offer.  When I try to change the Person who is associated with an 
>> existing 
>> > Offer, the odd result is that no error is returned: the "show" page is 
>> > displayed with the happy message "Offer was successfully updated."  But 
>> the 
>> > associated Person is still the pre-existing one; the change was not 
>> saved. 
>> > 
>> > And when I try to create a new Offer, I get an error that has appeared 
>> > before: 
>> > 1 error prohibited this offer from being saved: 
>> > Worker must exist 
>>
>> Is it possible to make a small standalone repo to demo this? That 
>> would make it a lot easier to help. 
>>
>> If not, I suggest writing a test to create an Offer and working with 
>> that until you get a working Offer.create statement. 
>>
>> -- 
>> Hassan Schroeder ------------------------ hassan.s...@gmail.com 
>> twitter: @hassan 
>> Consulting Availability : Silicon Valley or remote 
>>
>

-- 
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+unsubscr...@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/db55743a-61f8-4208-95b0-1a263f2a795b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to