Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About join table update error... #3

Open
sophia1215 opened this issue Jan 18, 2016 · 5 comments
Open

About join table update error... #3

sophia1215 opened this issue Jan 18, 2016 · 5 comments

Comments

@sophia1215
Copy link

hi, sir
i followed your video Ruby on Rails Tutorial 22 Updating Contact Info to make a practice, but i got an update porblem:

PG::NotNullViolation at /org_people/1
ERROR:  null value in column "address1" violates not-null constraint
DETAIL:  Failing row contains (25, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, 2016-01-18 03:13:20.368882, 2016-01-18 03:13:20.368882).

If you have some time please take a look at my practice

Thanks

@royalgiant
Copy link
Owner

Hey Sophia, Seems like your problem is that address1 is not coming through.
The address1 attribute cannot be null, but when you submit your form it's
coming through as null, which is causing your problem. It's hard to debug
with you through a file, but I suggest doing a "raise @org_ca.inspect" on
line 34 to see what values you are trying to update the database with and
from there trace back to your views and edit function to see if you are
setting everything correctly (the input fields in your view, etc.) Thank you

Donald Lee
Software Developer | Entrepreneur | Student

Connect with me on Linkedin: https://ca.linkedin.com/in/donaldlee50
Check me out at Github: https://github.com/royalgiant

On Sun, Jan 17, 2016 at 8:03 PM, Sophia Wang notifications@github.com
wrote:

hi, sir
i followed your video Ruby on Rails Tutorial 22 Updating Contact Info
https://wwwyoutubecom/watch?v=iIjPLn1K1JA to make a practice, but i got
an update porblem:

PG::NotNullViolation at /org_people/1
ERROR: null value in column "address1" violates not-null constraint
DETAIL: Failing row contains (25, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, 2016-01-18 03:13:20368882, 2016-01-18 03:13:20368882)

If you have some time please take a look at my practice
https://githubcom/sophia1215/dmeal/blob/master/app/controllers/org_people_controllerrb

Thanks


Reply to this email directly or view it on GitHub
#3.

@sophia1215
Copy link
Author

hi,sir
Thank you very much for the prompt reply.
I will have to try your method. 👍

@sophia1215
Copy link
Author

hi,sir
My problem has solved.
I followed your next video Ruby on Rails Tutorial 23 Model Validations & Ruby on Rails Tutorial 24 Geocoder, Latitude, Longitude
to add the geocoder gem for latitude,longitude fields && add OrgContact Mode Validates.

And thank you so much for your videos, they are relly helpfull.

@royalgiant
Copy link
Owner

Awesome Sophia, glad they help. Thanks for watching be sure to share and
stay in touch. My linkedin profile is below. Feel free to add.

Donald Lee
Software Developer | Entrepreneur | Student

Connect with me on Linkedin: https://ca.linkedin.com/in/donaldlee50
Check me out at Github: https://github.com/royalgiant

On Wed, Jan 20, 2016 at 1:11 AM, Sophia Wang notifications@github.com
wrote:

hi,sir
My problem has solved.
I followed your next video Ruby on Rails Tutorial 23 Model Validations
https://www.youtube.com/watch?v=huVAOHefF2w&index=24&list=PLw3DVCAvDGUtrWrm0s2zxnbrgzkG5YAfF
& Ruby on Rails Tutorial 24 Geocoder, Latitude, Longitude
https://www.youtube.com/watch?v=Mhlxni_tkdY&list=PLw3DVCAvDGUtrWrm0s2zxnbrgzkG5YAfF&index=25
to add the geocoder gem for latitude,longitude fields && add OrgContact
Mode Validates.

And thank you so much for your videos, they are relly helpfull.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@sophia1215
Copy link
Author

I am following you and give you a star.
my github: https://github.com/sophia1215
Thank you for sharing with us these videos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants