07-18-2023, 09:07 PM
I want to delete a record from the console.
I logged through script/console and
User.find(1).delete
$<User id: 1, ..............>
User.find(1)
ActiveRecord::RecordNotFound: Couldn't find User with ID=1
........
........
........
Everything looks fine till here.
But when I exit the console and return back to console by script/console command, I am able again to see the record with id = 1.
The database is not local and I'm connecting through database.yml by giving an ip.
when I try to do the same on the development local database, everything is fine.
Can someone please explain whats happening and where am I missing!
Thanks
I logged through script/console and
User.find(1).delete
$<User id: 1, ..............>
User.find(1)
ActiveRecord::RecordNotFound: Couldn't find User with ID=1
........
........
........
Everything looks fine till here.
But when I exit the console and return back to console by script/console command, I am able again to see the record with id = 1.
The database is not local and I'm connecting through database.yml by giving an ip.
when I try to do the same on the development local database, everything is fine.
Can someone please explain whats happening and where am I missing!
Thanks