Guys, I am trying to update a record on the console (Heroku)
I have an object called Photo
Photos have a tittle,… how do I address an specific photo via it’s
Id if I want to
update the tittle description etc?
Guys, I am trying to update a record on the console (Heroku)
I have an object called Photo
Photos have a tittle,… how do I address an specific photo via it’s
Id if I want to
update the tittle description etc?
If you know the ID, then you can do this:
photo = Photo.find 123
photo.title = ‘A greater title than before’
photo.save